]> git.sesse.net Git - kdenlive/blobdiff - src/documentchecker.cpp
const'ify
[kdenlive] / src / documentchecker.cpp
index 8614eeab673eba6dfb94f85c4dc095e3b22c3a23..68fee92bc6a2b32ff0eae028e8ecd45ef61afe01 100644 (file)
@@ -176,7 +176,7 @@ bool DocumentChecker::hasErrorInClips()
             filesToCheck.append(luma);
     }
     // Check existence of luma files
-    foreach (const QString lumafile, filesToCheck) {
+    foreach (const QString &lumafile, filesToCheck) {
         filePath = lumafile;
         if (!filePath.startsWith('/')) filePath.prepend(root);
         if (!QFile::exists(filePath)) {
@@ -193,7 +193,7 @@ bool DocumentChecker::hasErrorInClips()
     m_dialog->setFont(KGlobalSettings::toolBarFont());
     m_ui.setupUi(m_dialog);
 
-    foreach(const QString l, missingLumas) {
+    foreach(const QString &l, missingLumas) {
         QTreeWidgetItem *item = new QTreeWidgetItem(m_ui.treeWidget, QStringList() << i18n("Luma file") << l);
         item->setIcon(0, KIcon("dialog-close"));
         item->setData(0, idRole, l);
@@ -420,7 +420,7 @@ bool DocumentChecker::hasErrorInClips()
     connect(m_ui.usePlaceholders, SIGNAL(pressed()), this, SLOT(slotPlaceholders()));
     connect(m_ui.removeSelected, SIGNAL(pressed()), this, SLOT(slotDeleteSelected()));
     connect(m_ui.fixDuration, SIGNAL(pressed()), this, SLOT(slotFixDuration()));
-    connect(m_ui.treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(slotEditItem(QTreeWidgetItem *, int)));
+    connect(m_ui.treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(slotEditItem(QTreeWidgetItem*,int)));
     connect(m_ui.treeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(slotCheckButtons()));
     //adjustSize();
     if (m_ui.treeWidget->topLevelItem(0)) m_ui.treeWidget->setCurrentItem(m_ui.treeWidget->topLevelItem(0));
@@ -465,7 +465,8 @@ void DocumentChecker::slotSearchClips()
     if (newpath.isEmpty()) return;
     int ix = 0;
     bool fixed = false;
-    m_ui.recursiveSearch->setEnabled(false);
+    m_ui.recursiveSearch->setChecked(true);
+    qApp->processEvents();
     QTreeWidgetItem *child = m_ui.treeWidget->topLevelItem(ix);
     QDir searchDir(newpath);
     while (child) {
@@ -514,6 +515,7 @@ void DocumentChecker::slotSearchClips()
         ix++;
         child = m_ui.treeWidget->topLevelItem(ix);
     }
+    m_ui.recursiveSearch->setChecked(false);
     m_ui.recursiveSearch->setEnabled(true);
     if (fixed) {
         // original doc was modified
@@ -856,7 +858,7 @@ void DocumentChecker::slotDeleteSelected()
     if (!deletedLumas.isEmpty()) {
         QDomElement e;
         QDomNodeList transitions = m_doc.elementsByTagName("transition");
-        foreach (QString lumaPath, deletedLumas) {
+        foreach (const QString &lumaPath, deletedLumas) {
             for (int i = 0; i < transitions.count(); i++) {
                 e = transitions.item(i).toElement();
                 QString resource = EffectsList::property(e, "luma");