QCA2

Albert Astals Cid aacid at kde.org
Sun Sep 11 09:35:43 BST 2022


El diumenge, 11 de setembre de 2022, a les 4:44:24 (CEST), Ron Murray va 
escriure:
> Hi Albert.
> 
>    OK. I see that it works for a command-line program (I didn't know
> about qcatool, to be honest). Perhaps I didn't make it clear, but my
> project is a GUI program, using Qt5.

What does being command line or GUI have to do with anything? 

If qcatool can ask on the command line, you can just as well show a dialog 
instead of asking on the command line, right?

> Currently, QCA invokes the gpg
> executable (although I gather there are plans to switch to GPGME), and
> there are, as far as I know, only three ways to feed gpg with a
> passphrase when it needs one:
> 
> - Have gpg request it directly on the console, as you describe,
> 
> - Directly, on the command line (not a good idea), and
> 
> - Via gpg-agent.
> 
>    gpg, when invoked manually, opens up a pinentry dialog, which
> collects the passphrase and feeds it to gpg-agent. QCA doesn't seem to
> contain the necessary assuan code to do that. Furthermore, it can't
> request for it on the console because it forces "--pinentry-mode
> loopback", which suppresses that. Besides, you don't want to use the
> console for anything when you're running a GUI program.
> 
>    Since QCA invokes the gpg executable anyway, it makes more sense to
> just let gpg bring up a pinentry dialog.

That's not QCA design, the design is that the application brings up its own 
dialog if it needs it when it gets asked via the QCA::Event::Password request.

Cheers,
  Albert




More information about the kde-core-devel mailing list