summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-30 05:13:28 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-30 05:13:28 (GMT)
commitf0e19f4b6b4752c27ac2c9b5fd850b5349b63755 (patch)
tree49d8206157b7a93e5c5b1d5207ea116eb811614c
parent7d3cf093bd451d77ac6ccd57f39870b48a8a778f (diff)
Prevent double delete of FolderSelectionDialog
Patch from Denis Kurz https://phabricator.kde.org/D2600 Thanks
-rw-r--r--src/folder/folderrequester.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/folder/folderrequester.cpp b/src/folder/folderrequester.cpp
index deea3d1..ae09608 100644
--- a/src/folder/folderrequester.cpp
+++ b/src/folder/folderrequester.cpp
@@ -102,9 +102,7 @@ void FolderRequester::slotOpenDialog()
options |= FolderSelectionDialog::HideOutboxFolder;
}
- QScopedPointer<FolderSelectionDialog> dlg(
- new FolderSelectionDialog(this, options));
-
+ QPointer<FolderSelectionDialog> dlg(new FolderSelectionDialog(this, options));
dlg->setWindowTitle(i18n("Select Folder"));
dlg->setModal(false);
dlg->setSelectedCollection(d->mCollection);
@@ -112,6 +110,7 @@ void FolderRequester::slotOpenDialog()
if (dlg->exec() && dlg) {
setCollection(dlg->selectedCollection(), false);
}
+ delete dlg;
}
//-----------------------------------------------------------------------------