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

index 66ae06a5a4cf1ac427ae4ffd70932a9a2097f223..3cef47677b63e1a617d678cb802fa9dc3909b14d 100644 (file)
@@ -3756,13 +3756,14 @@ int MainWindow::getNewStuff(const QString &configFile)
 {
     KNS3::Entry::List entries;
 #if KDE_IS_VERSION(4,3,80)
-    KNS3::DownloadDialog dialog(configFile);
-    dialog.exec();
-    entries = dialog.changedEntries();
+    QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog(configFile);
+    dialog->exec();
+    entries = dialog->changedEntries();
     foreach(const KNS3::Entry & entry, entries) {
         if (entry.status() == KNS3::Entry::Installed)
             kDebug() << "// Installed files: " << entry.installedFiles();
     }
+    delete dialog;
 #else
     KNS::Engine engine(0);
     if (engine.init(configFile))