From 95bcb39412088cd10308bef2d351f765c642bf6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Mon, 18 May 2015 18:21:35 +0200 Subject: [PATCH] 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). --- kmmainwin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmmainwin.cpp b/kmmainwin.cpp index a75d479a4..46a9851b0 100644 --- a/kmmainwin.cpp +++ b/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();