newFile: Use QPointer [krazy 21/37] by Mikko Rapeli

parent 18e6edb6
......@@ -1870,12 +1870,16 @@ void MainWindow::newFile(bool showProjectSettings, bool force)
if (!closeCurrentDocument())
return;
} else {
ProjectSettings *w = new ProjectSettings(NULL, QMap <QString, QString> (), QStringList(), projectTracks.x(), projectTracks.y(), KdenliveSettings::defaultprojectfolder(), false, true, this);
if (w->exec() != QDialog::Accepted)
QPointer<ProjectSettings> w = new ProjectSettings(NULL, QMap <QString, QString> (), QStringList(), projectTracks.x(), projectTracks.y(), KdenliveSettings::defaultprojectfolder(), false, true, this);
if (w->exec() != QDialog::Accepted) {
delete w;
return;
}
if (!KdenliveSettings::activatetabs())
if (!closeCurrentDocument())
if (!closeCurrentDocument()) {
delete w;
return;
}
if (KdenliveSettings::videothumbnails() != w->enableVideoThumbs())
slotSwitchVideoThumbs();
if (KdenliveSettings::audiothumbnails() != w->enableAudioThumbs())
......
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