Do not connect KStandardAction::quit() to QApplication::quit()
David Faure
faure at kde.org
Wed Jan 30 15:19:32 GMT 2008
On Thursday 06 December 2007, Aurélien Gâteau wrote:
> 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?
Yes please do.
(IIRC this behavior was the same in kde3, right? We didn't document it much back then either,
but I now added something to KStandardAction::quit)
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list