KMail: fix queryClose() always returning true

KConfigGui::sessionConfig() always returns a valid pointer, so the condition
would always be true, which caused KMail to terminate whenever the main window
was closed (even when systray was enabled).

qApp->isSavingSession() is the right way to tell whether session saving is
in progress (even if we handle it by our own config).
wilder-work
Dan Vrátil 11 years ago
parent bc56033e7a
commit 95bcb39412
  1. 2
      kmmainwin.cpp

@ -208,7 +208,7 @@ void KMMainWin::saveProperties(KConfigGroup &config)
bool KMMainWin::queryClose()
{
if (kmkernel->shuttingDown() || KConfigGui::sessionConfig() || mReallyClose) {
if (kmkernel->shuttingDown() || qApp->isSavingSession() || mReallyClose) {
return true;
}
return kmkernel->canQueryClose();

Loading…
Cancel
Save