Fix Bug 412122 - Crash when closing the composer

I can't reproduce it, but I disconnect signal when we detroy composer.
I hope that it will fix this crash
BUG: 412122
FIXED-IN: 5.12.2
wilder
Laurent Montel 7 years ago
parent 66e6bcef1b
commit 6198b64266
  1. 3
      src/editor/kmcomposerwin.cpp
  2. 1
      src/editor/kmcomposerwin.h

@ -443,7 +443,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState
applyMainWindowSettings(KMKernel::self()->config()->group("Composer"));
connect(mEdtSubject, &PimCommon::LineEditWithAutoCorrection::textChanged, this, &KMComposerWin::slotUpdateWindowTitle);
mUpdateWindowTitleConnection = connect(mEdtSubject, &PimCommon::LineEditWithAutoCorrection::textChanged, this, &KMComposerWin::slotUpdateWindowTitle);
mIdentityConnection = connect(identity, &KIdentityManagement::IdentityCombo::identityChanged, [this](uint val) {
slotIdentityChanged(val);
});
@ -494,6 +494,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState
KMComposerWin::~KMComposerWin()
{
disconnect(mUpdateWindowTitleConnection);
// When we have a collection set, store the message back to that collection.
// Note that when we save the message or sent it, mFolder is set back to 0.
// So this for example kicks in when opening a draft and then closing the window.

@ -632,6 +632,7 @@ private:
QString mdbusObjectPath;
static int s_composerNumber;
QMetaObject::Connection mIdentityConnection;
QMetaObject::Connection mUpdateWindowTitleConnection;
MessageComposer::ComposerViewBase *mComposerBase = nullptr;

Loading…
Cancel
Save