]> git.sesse.net Git - kdenlive/commitdiff
slotAddClipMarker: Use QPointer [krazy 25/37] by Mikko Rapeli
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 23 Jul 2012 07:11:06 +0000 (09:11 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 23 Jul 2012 07:11:06 +0000 (09:11 +0200)
src/mainwindow.cpp

index 4edb4b5797a59e16bc96c92de4c3e505193f1165..d91153ee03a46137f960fd282c8c24806a5a43fe 100644 (file)
@@ -2833,9 +2833,11 @@ void MainWindow::slotAddClipMarker()
     }
     QString id = clip->getId();
     CommentedTime marker(pos, i18n("Marker"));
-    MarkerDialog d(clip, marker, m_activeDocument->timecode(), i18n("Add Marker"), this);
-    if (d.exec() == QDialog::Accepted)
-        m_activeTimeline->projectView()->slotAddClipMarker(id, d.newMarker().time(), d.newMarker().comment());
+    QPointer<MarkerDialog> d = new MarkerDialog(clip, marker,
+                       m_activeDocument->timecode(), i18n("Add Marker"), this);
+    if (d->exec() == QDialog::Accepted)
+        m_activeTimeline->projectView()->slotAddClipMarker(id, d->newMarker().time(), d->newMarker().comment());
+    delete d;
 }
 
 void MainWindow::slotDeleteClipMarker()