View Full Version : What KDE sends to running programs when logout?

31st January 2007, 09:33
I tried to catch it in my Qt program to make sure objects are correctly destructed
But I tried SIGKILL SIGHUP SIGQUIT SIGTERM and SIGINT, but seems none of them is correct...


31st January 2007, 10:29
Try this: http://doc.trolltech.com/4.2/session.html

31st January 2007, 15:48
Try this: http://doc.trolltech.com/4.2/session.html

Thanks, this helps a lot.
I reimplemented the QApplication::commitData function to save the data
Now the program can correctly save the data when logout
But the static object, which is used to make sure that there's only one instance of the program running, seems still not destroyed correctly.
Any suggestion?

1st February 2007, 20:00
There is a special signal sent by KApplication (see here (http://api.kde.org/3.4-api/kdecore/html/classKApplication.html#l10)). You might try QApplication::aboutToQuit() too.