Skip to content

Commit

Permalink
Fix crash in Qt 6.6 QDialog destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Nov 9, 2023
1 parent b05868f commit a798b20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/settingsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
Expand Down

0 comments on commit a798b20

Please sign in to comment.