]> git.sesse.net Git - kdenlive/blobdiff - src/mainwindow.cpp
fix coverity 1134134 1134135 (div by 0)
[kdenlive] / src / mainwindow.cpp
index 25642b33998f4f919774e861a3843fc0e1488fac..517e321e7f60acc6826d87f3f36ce113e23256ca 100644 (file)
@@ -69,7 +69,7 @@
 
 #include <KApplication>
 #include <KAction>
-#include <KLocale>
+#include <KLocalizedString>
 #include <KGlobal>
 #include <KActionCollection>
 #include <KActionCategory>
 #include <QInputDialog>
 #include <QDesktopWidget>
 #include <QBitmap>
+#include <QUndoGroup>
 
 #include <stdlib.h>
 #include <locale.h>
@@ -2263,7 +2264,7 @@ void MainWindow::doOpenFile(const KUrl &url, KAutoSaveFile *stale)
     if (openBackup) slotOpenBackupDialog(url);
 }
 
-void MainWindow::recoverFiles(QList<KAutoSaveFile *> staleFiles, const KUrl &originUrl)
+void MainWindow::recoverFiles(const QList<KAutoSaveFile *> &staleFiles, const KUrl &originUrl)
 {
     foreach(KAutoSaveFile * stale, staleFiles) {
         /*if (!stale->open(QIODevice::QIODevice::ReadOnly)) {
@@ -3896,8 +3897,7 @@ int MainWindow::getNewStuff(const QString &configFile)
     KNS3::Entry::List entries;
 #if KDE_IS_VERSION(4,3,80)
     QPointer<KNS3::DownloadDialog> dialog = new KNS3::DownloadDialog(configFile);
-    dialog->exec();
-    if (dialog) entries = dialog->changedEntries();
+    if (dialog->exec()) entries = dialog->changedEntries();
     foreach(const KNS3::Entry & entry, entries) {
         if (entry.status() == KNS3::Entry::Installed)
             kDebug() << "// Installed files: " << entry.installedFiles();
@@ -4609,7 +4609,9 @@ void MainWindow::slotArchiveProject()
     QList <DocClipBase*> list = m_projectList->documentClipList();
     QDomDocument doc = m_activeDocument->xmlSceneList(m_projectMonitor->sceneList(), m_projectList->expandedFolders());
     ArchiveWidget *d = new ArchiveWidget(m_activeDocument->url().fileName(), doc, list, m_activeTimeline->projectView()->extractTransitionsLumas(), this);
-    d->exec();
+    if (d->exec()) {
+        m_messageLabel->setMessage(i18n("Archiving project"), OperationCompletedMessage);
+    }
 }