From 36c3edb4820e90e5e25607dcbdc7e5358cd74609 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Wed, 8 Nov 2023 16:47:44 +0100 Subject: [PATCH] Fix crash in Qt 6.6 QDialog destructor --- src/gui/settingsdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 530745e3966..562bcb94297 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -246,7 +246,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) tr("Are you sure you want to quit %1?").arg(appNameGui), QMessageBox::Yes | QMessageBox::No, this); box->setAttribute(Qt::WA_DeleteOnClose); connect(box, &QMessageBox::accepted, this, [] { - qApp->quit(); + // delay quit to prevent a Qt 6.6 crash in the destructor of the dialog + QTimer::singleShot(0, qApp, &QCoreApplication::quit); }); box->open(); });