summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Marten <[email protected]>2018-03-12 09:24:47 +0000
committerJonathan Marten <[email protected]>2018-03-12 09:24:47 +0000
commit1c9c6886f1efb650c10d5b236f13393429f147dd (patch)
tree989e78708e7b2e15d07a1f7ba4ab255eac07f8e4
parentc7f7d6bd88f1d392954613519631c899c123dec9 (diff)
Disconnect BroadcastStatus from the status bar to avoid crash on exit
BUG:387177 Differential Revision: https://phabricator.kde.org/D11256
-rw-r--r--src/kmmainwin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kmmainwin.cpp b/src/kmmainwin.cpp
index eaf94e6..ce3b042 100644
--- a/src/kmmainwin.cpp
+++ b/src/kmmainwin.cpp
@@ -91,6 +91,10 @@ KMMainWin::KMMainWin(QWidget *)
KMMainWin::~KMMainWin()
{
+ // Avoids a crash if there are any Akonadi jobs running, which may
+ // attempt to display a status message when they are killed.
+ disconnect(KPIM::BroadcastStatus::instance(), &KPIM::BroadcastStatus::statusMsg, this, nullptr);
+
KConfigGroup grp(KMKernel::self()->config()->group("Main Window"));
saveMainWindowSettings(grp);
KMKernel::self()->config()->sync();