Do not connect KStandardAction::quit() to QApplication::quit()

Aurélien Gâteau aurelien.gateau at free.fr
Thu Dec 6 21:46:58 GMT 2007


Hello,

I just got bitten by this one, so I thought I'd share it with you.

If your application implements KMainWindow::queryClose() to warn the user
about unsaved changes for example, do not connect KStandardAction::quit()
to QApplication::quit() as it would bypass the queryClose(). Instead,
connect it to QApplication::closeAllWindows().

I had a look at my incomplete checkout of KDE and only find one mistake:
kapptemplate. Attached patch fix it. Ok to commit?

Please note I do not have a full KDE checkout, so it may be a good idea for
you to check your application.

Aurélien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdesvn_fix_quit_action.diff
Type: text/x-diff
Size: 1184 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071206/79f998a4/attachment.diff>


More information about the kde-core-devel mailing list