Commit b2ebd8f2 authored by David Edmundson's avatar David Edmundson

Don't leak DrKonqi dialog / fix crash on wayland

Summary:
When a QApplication is in it's destructor it calls window->destroy()
on all remaining QWindows. This deletes the platform window, whilst
keeping the real object alive. QtWayland doesn't like this.

Deleting the dialog fixes the issue. The deleteLater is fine because
QCoreApplication teardown is magic.

Test Plan: crashTest

Reviewers: #plasma, sitter

Reviewed By: sitter

Subscribers: anthonyfieroni, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28692
parent 1da2c673
......@@ -65,6 +65,7 @@ static const char description[] = I18N_NOOP("The KDE Crash Handler gives the use
namespace {
void openDrKonqiDialog () {
DrKonqiDialog *w = new DrKonqiDialog();
QObject::connect(qApp, &QCoreApplication::aboutToQuit, w, &QObject::deleteLater);
QObject::connect(w, &DrKonqiDialog::rejected, qApp, &QApplication::quit);
w->show();
#ifdef Q_OS_MACOS
......
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