Fix crash when clicking on import legacy account dialog 'Skip' button.

- mac OS only: With Qt::WA_DeleteOnClose the dialog was being deleted twice.

Signed-off-by: Camila <hello@camila.codes>
This commit is contained in:
Camila 2023-10-30 17:48:15 +01:00
parent f3dff83fa2
commit 44e8e4b2e9

View file

@ -199,7 +199,6 @@ bool AccountManager::restoreFromLegacySettings()
const auto importMessageBox = new QMessageBox(QMessageBox::Question, tr("Legacy import"), importQuestion);
importMessageBox->addButton(tr("Import"), QMessageBox::AcceptRole);
const auto skipButton = importMessageBox->addButton(tr("Skip"), QMessageBox::DestructiveRole);
importMessageBox->setAttribute(Qt::WA_DeleteOnClose);
importMessageBox->exec();
if (importMessageBox->clickedButton() == skipButton) {
return false;