- Allow typing custom commands into the combobox (with config option for disabling this)
- Allow defining commands from a config file
Description
Revisions and Commits
Related Objects
- Mentioned In
- T7395: Prepare Release Notes for Gpg4win 4.4.0 for Kleopatra
- Mentioned Here
- T6072: Kleopatra: Display "gpgconf -X"
Event Timeline
Implemented in https://invent.kde.org/pim/kleopatra/-/merge_requests/290
Some notes:
- The config key for disabling custom commands is AllowCustomDebugCommands under General in kleopatrarc (default true)
- Commands can be defined in kleopatradebugcommandsrc; the format is explained in debugdialog.cpp
- Custom commands are appended to the list of the combobox (but will be gone after closing the dialog)
- To work in gpg4win, a change for the build scripts is needed to install kleopatradebugcommandsrc (similar to what it's doing for libkleopatrarc). I'll try to get to it today, but if i don't, it would be best if someone else takes care of that before i'm back
Gpg4win-Beta-75: This is in principle ok. Even adding further commands to
C:\Program Files (x86)\Gpg4win\etc\xdg\kleopatradebugcommandsrc works:
But:
When I enter "gpg" + Return in the Input field, 2 gpg processes are started and no output is shown in the output field of the window.
Closing the window is then followed by a crash:
5484 18119.858606 6460 kleopatra.exe QProcess: Destroyed while process ("gpg") is still running. 5485 18122.194077 6460 kleopatra.exe <process started at 14:25:44.877 has terminated with 0xc0000005 (EXCEPTION_ACCESS_VIOLATION)>
The QProcesses we start should be configured with closed stdin so that the started process don't hang waiting for input, e.g. by calling closeWriteChannel() immediately after start(). Or by calling start() with QIODeviceBase::ReadOnly, but, sadly, the documentation of QProcess doesn't document what effect that has.
Hmm, calling QProcess::setStandardInputFile(QProcess::nullDevice()) before start() may be even better than calling closeWriteChannel() after start().
Hmm, calling QProcess::setStandardInputFile(QProcess::nullDevice()) before start() may be even better than calling closeWriteChannel() after start().
Done in https://invent.kde.org/pim/kleopatra/-/merge_requests/319
And to make commands run only once when Enter is pressed: https://invent.kde.org/pim/kleopatra/-/merge_requests/320
Gpg4win-Beta-94: works.
Could be a bit more refined in the future, but this would be for another ticket.