]> git.sesse.net Git - kdenlive/blobdiff - src/initeffects.cpp
[PATCH by Ray Lehtiniem] Delete some unused variables
[kdenlive] / src / initeffects.cpp
index 42d542a474464461be82e82e31e068343f732696..12174d8d1a2806a204233f746246f97079f87f6c 100644 (file)
  *                                                                         *
  ***************************************************************************/
 
-
-#include <QFile>
-#include <qregexp.h>
-#include <QDir>
-#include <QIcon>
-
-#include <KDebug>
-#include <kglobal.h>
-#include <KStandardDirs>
-
 #include "initeffects.h"
 #include "kdenlivesettings.h"
 #include "effectslist.h"
 #include "effectstackedit.h"
 #include "mainwindow.h"
 
+#include <KDebug>
+#include <kglobal.h>
+#include <KStandardDirs>
+
+#include <QFile>
+#include <qregexp.h>
+#include <QDir>
+#include <QIcon>
+
 initEffectsThumbnailer::initEffectsThumbnailer() {
 
 }
@@ -225,7 +224,7 @@ void initEffects::parseCustomEffectsFile() {
     filter << "*.xml";
     const QStringList fileList = directory.entryList(filter, QDir::Files);
     QString itemName;
-    foreach(const QString filename, fileList) {
+    foreach(const QString &filename, fileList) {
         itemName = KUrl(path + filename).path();
         QDomDocument doc;
         QFile file(itemName);
@@ -256,24 +255,23 @@ void initEffects::parseEffectFile(EffectsList *customEffectList, EffectsList *au
     }
     QString groupName;
     if (doc.elementsByTagName("effectgroup").item(0).toElement().tagName() == "effectgroup") {
-        groupName = documentElement.attribute("name", QString::null);
+        groupName = documentElement.attribute("name", QString());
     }
 
     int i = 0;
 
     while (!effects.item(i).isNull()) {
         documentElement = effects.item(i).toElement();
-        QString tag = documentElement.attribute("tag", QString::null);
+        QString tag = documentElement.attribute("tag", QString());
         bool ladspaOk = true;
         if (tag == "ladspa") {
-            QString library = documentElement.attribute("library", QString::null);
+            QString library = documentElement.attribute("library", QString());
             if (KStandardDirs::locate("ladspa_plugin", library).isEmpty()) ladspaOk = false;
         }
 
         // Parse effect file
         if ((filtersList.contains(tag) || producersList.contains(tag)) && ladspaOk) {
-            bool isAudioEffect = false;
-            QString type = documentElement.attribute("type", QString::null);
+            QString type = documentElement.attribute("type", QString());
             if (type == "audio") audioEffectList->append(documentElement);
             else if (type == "custom") customEffectList->append(documentElement);
             else videoEffectList->append(documentElement);
@@ -297,10 +295,10 @@ void initEffects::parseEffectFile(EffectsList *customEffectList, EffectsList *au
          QDomNode propsnode = documentElement.elementsByTagName("properties").item(0);
          if (!propsnode.isNull()) {
              QDomElement propselement = propsnode.toElement();
-             id = propselement.attribute("id", QString::null);
-             effectTag = propselement.attribute("tag", QString::null);
-             if (propselement.attribute("type", QString::null) == "audio") type = AUDIOEFFECT;
-             else if (propselement.attribute("type", QString::null) == "custom") type = CUSTOMEFFECT;
+             id = propselement.attribute("id", QString());
+             effectTag = propselement.attribute("tag", QString());
+             if (propselement.attribute("type", QString()) == "audio") type = AUDIOEFFECT;
+             else if (propselement.attribute("type", QString()) == "custom") type = CUSTOMEFFECT;
              else type = VIDEOEFFECT;
          }