Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0bfd1334 authored by Christoph Cullmann's avatar Christoph Cullmann

try to avoid crash on session save due to still existing main windows after

document manager destruction

I can not really reproduce the crash, therefore: if it still happens,
please reopen

BUG: 378085
parent 209cc038
......@@ -77,6 +77,14 @@ KateApp::~KateApp()
m_adaptor.emitExiting();
QDBusConnection::sessionBus().unregisterObject(QStringLiteral("/MainApplication"));
}
/**
* delete all main windows before the document manager & co. die
*/
while (!m_mainWindows.isEmpty()) {
// mainwindow itself calls KateApp::removeMainWindow(this)
delete m_mainWindows[0];
}
}
KateApp *KateApp::self()
......@@ -236,12 +244,11 @@ void KateApp::shutdownKate(KateMainWindow *win)
sessionManager()->saveActiveSession(true);
// cu main windows
while (!m_mainWindows.isEmpty()) {
// mainwindow itself calls KateApp::removeMainWindow(this)
delete m_mainWindows[0];
}
/**
* all main windows will be cleaned up
* in the KateApp destructor after the event
* loop is left
*/
QApplication::quit();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment