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) {
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++) {
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));