Autoclose a wallet on client exit

Michael Leupold lemma at
Tue Oct 28 22:27:54 GMT 2008


you might have gotten my recent question about the kwallet/kopete mess. Now, 
ossi pointed out that I could as well have kwalletd autodetect when an 
application exits and close the wallet.

So here's my go at it. Some explanations:
- This introduces a setAutoClose(QString appname, bool autoclose) method 
that's automatically called by every client using the KWallet API.
- On receiving this call the daemon remembers the application name and the 
application's DBus service (using QDBusContext)
- on serviceOwnerChanged the daemon closes the exiting clients connections.

The new call is introduced so that multi-process clients (eg. shell scripts 
using qdbus) keep working. close() is still needed for explicit closing. The 
patch is binary safe. It works with well-behaved clients as well as not-so-
well-behaved clients.

Someone please review or I'll have to bug dfaure again :-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kwallet-autoclose-on-client-exit.diff
Type: text/x-patch
Size: 5417 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list