KWallet::openWallet and 0-WinId ?

Martin Gräßlin mgraesslin at kde.org
Tue May 2 08:04:34 UTC 2017


Am 2017-05-01 17:33, schrieb Martin Koller:
> Hi,
> 
> the Wallet::openWallet() documentation says for the WinId argument:
> "The window id to associate any dialogs with. You can pass 0 if you
> don't have a window the password dialog should associate with."
> 
> However passing 0 gives a runtime warning
>         qDebug() << "Pass a valid window to 
> KWallet::Wallet::openWallet().";
> 
> So what is correct ?
> 
> openWallet() is used by a lot PIM resources and all these show the
> warning when akonaditray is not registered
> on the DBUS (which means winId is passed as 0)

Simply put: no sane window manager will pass focus to KWallet if it 
doesn't have a window which it can be associated with.

This is the reason why KWallet opens behind (!) other windows and 
unfocused in Plasma when Akonadi tries to interact with it.

So at least in reality allowing 0 is not correct.

Cheers
Martin


More information about the Kde-frameworks-devel mailing list