readOptions: Use QPointer [krazy 19/37] by Mikko Rapeli

parent ffa934dd
......@@ -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<Wizard> 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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment