PDA

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



bood
31st January 2007, 10: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...

Thanks

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

bood
31st January 2007, 16: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?

jacek
1st February 2007, 21: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.