[Interest] The willy-nilly deletion of convenience methods

Sérgio Martins iamsergio at gmail.com
Sun Mar 21 22:43:28 CET 2021


> On Sun, Mar 21, 2021 at 9:28 PM Thiago Macieira <thiago.macieira at intel.com> wrote:
>
> On Sunday, 21 March 2021 12:40:02 PDT Thorsten Glaser wrote:
> > You misunderstand.
> >
> > I need to use the KDE Wallet API. This involves doing a Qt application
> > and other fancy stuff. The CLI program needs $DISPLAY set and usable,
> > because that’s where it connects to the KDE wallet. It’s still a CLI,
> > intended for use in e.g. scripts.
>
> What CLI program are we talking about here? It's not clear what you're
> referring to here, since this involves the KWallet daemon, a D-Bus API, and a
> client. The daemon, as the name indicates, has no UI. But it does actually
> connect to the X server so it can present the password prompts. So I am
> unclear if you meant that the kwalletd application is the CLI.
>
> I assume you're trying to make a CLI client to KWallet. KWallet's D-Bus API
> has as a parameter a window ID (see below), which is meant to allow the wallet
> password prompt to become modal to one of your windows, so the user must type
> the password or dismiss the dialogue, instead of missing it and wondering why
> the window is now unresponsive.
>
> If that's the case, pass one of your window IDs, *not* the root window ID.
> That's an abuse of the KWallet D-Bus API.
>
> Or instead extend the API so it accepts window-less clients. For example, you
> could make passing 0 or -1 to this parameter (whichever is an invalid window
> ID) be interpreted as "no window".

Quoting KWallet's documentation [1]:

"You can pass 0 if you don't have a window the password dialog should
associate with. "


[1] https://api.kde.org/frameworks/kwallet/html/classKWallet_1_1Wallet.html#acfdc7a90f734a614cd55f57568854a28


Regards,
Sergio Martins


More information about the Interest mailing list