From 2c520f24bbb09fd7f94cd3dc061c7739f9dba61c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Mon, 23 Jul 2012 09:06:18 +0200 Subject: [PATCH] readOptions: Use QPointer [krazy 19/37] by Mikko Rapeli --- src/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b9c21904..b296baa0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1830,12 +1830,13 @@ void MainWindow::readOptions() if (!initialGroup.exists() || upgrade) { // this is our first run, show Wizard - Wizard *w = new Wizard(upgrade, this); + QPointer w = new Wizard(upgrade, this); if (w->exec() == QDialog::Accepted && w->isOk()) { w->adjustSettings(); initialGroup.writeEntry("version", version); delete w; } else { + delete w; ::exit(1); } } -- 2.39.2