Thanks for the Patch. Generally it's a bit much copy and paste in my opinion without questioning if the pasted code really makes sense for this. While we've talked about not basing it on Gnuprocesscommand I think some of that code is redundant and we should probably change gnupgprocesscommand that it's a useful base class for this. I'll take a look at it.
I've added some inline comments but basically your patch is ok. I'll rework your patch a bit and change it to "Print secret key" which will output a PDF or directly open the Print dialog. I don't think we should put paperkey into the user interface as it is an unknown tool for users. We should also inform the user that she should upload the public key or back it up for a full restore.
Please remove the line break changes from this patch.
Why is this necessary and not just part of arguments?
In new code it's better to use the Q_D Q_Q macros and the according declarations.
This appears overly complicated to me. You have a specialized class for paperkey export so you don't need generic argument parsing.
The whole split between paperkeyexporcommand and paperkeyprocesscommand appears arbitrary and unnecessary to me.
Probably better to use something like GnuPG Output: and Paperkey Output: here instead of Process1 and 2 as the processes are hardcoded.
why the else at all.
instead of the ba.chop stuff you can just call QString::trimmed() here.
The moc includes should not be necessary.
Copy paste artifact?
QStringLiteral (" .txt") instead of the two strings and the extensions array.
You only have the one :-)
Should not be necessary thanks to automoc.
While I see that this is copied from exportsecretkey I don't think a private class implementation makes much sense in such specialized code.
The dialog did not have a correct height for me. The raw and base16 radio buttons were "squashed".
You need to bump the version of this file if you make changes. Otherwise the new actions are not shown if a user has modified his config.
I guess until we have an icon for this it would be better to just reuse the export secret key icon.
whitespace error and style only change.
Imo you should just put the three functions here into gnupg-helper the name may not be 100% fitting but from the type of functions it makes sense there.
You are using tabs at least here. Please just use whitespace everywhere for indention.