]> git.sesse.net Git - kdenlive/commitdiff
Fix compilation with Qt < 4.5
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 2 Nov 2009 10:47:13 +0000 (10:47 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 2 Nov 2009 10:47:13 +0000 (10:47 +0000)
svn path=/trunk/kdenlive/; revision=4086

src/projectlist.cpp
src/projectsettings.cpp

index 0aafc1de694f2b0bc827e2412798f077550a5b08..588b275c77af9c5bd5b1c461b0df01c10bab1390 100644 (file)
@@ -261,11 +261,11 @@ void ProjectList::trashUnusedClips()
         if (!item->isGroup() && item->numReferences() == 0) {
             ids << item->clipId();
             KUrl url = item->clipUrl();
-            if (!url.isEmpty()) urls << url.path();
+            if (!url.isEmpty() && !urls.contains(url.path())) urls << url.path();
         }
         it++;
     }
-    urls.removeDuplicates();
+
     // Check that we don't use the URL in another clip
     QTreeWidgetItemIterator it2(m_listView);
     while (*it2) {
index 5188e8bf85ac69fe200e5b1820cfee045ed94b54..c4e7c817b45b9a5e771b5e4af3ea8356fb89032b 100644 (file)
@@ -85,10 +85,9 @@ void ProjectSettings::slotDeleteUnused()
         DocClipBase *clip = list.at(i);
         if (clip->numReferences() == 0 && clip->clipType() != SLIDESHOW) {
             KUrl url = clip->fileURL();
-            if (!url.isEmpty()) toDelete << url.path();
+            if (!url.isEmpty() && !toDelete.contains(url.path())) toDelete << url.path();
         }
     }
-    toDelete.removeDuplicates();
 
     // make sure our urls are not used in another clip
     for (int i = 0; i < list.count(); i++) {
@@ -164,7 +163,9 @@ void ProjectSettings::slotUpdateFiles(bool cacheOnly)
             usedSize += clip->fileSize();
         }
     }
+#if QT_VERSION >= 0x040500    
     allFiles.removeDuplicates();
+#endif
     files_count->setText(QString::number(allFiles.count()));
     files_list->addItems(allFiles);
     used_count->setText(QString::number(used));