[Kdenlive-devel] [PATCH kdenlive 04/27] const parameters as reference

Mikko Rapeli mikko.rapeli at iki.fi
Sun Aug 28 10:24:44 UTC 2011


Found by cppcheck.
---
 src/clipmanager.cpp |   16 ++++++++--------
 src/clipmanager.h   |   16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/clipmanager.cpp b/src/clipmanager.cpp
index 7993794..d3669ca 100644
--- a/src/clipmanager.cpp
+++ b/src/clipmanager.cpp
@@ -264,7 +264,7 @@ void ClipManager::resetProducersList(const QList <Mlt::Producer *> prods, bool d
     emit checkAllClips(displayRatioChanged, fpsChanged);
 }
 
-void ClipManager::slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId)
+void ClipManager::slotAddClipList(const KUrl::List urls, const QString &group, const QString &groupId)
 {
     QUndoCommand *addClips = new QUndoCommand();
 
@@ -340,12 +340,12 @@ void ClipManager::slotAddClipList(const KUrl::List urls, const QString group, co
     }
 }
 
-void ClipManager::slotAddClipFile(const KUrl url, const QString group, const QString &groupId)
+void ClipManager::slotAddClipFile(const KUrl &url, const QString &group, const QString &groupId)
 {
     slotAddClipList(KUrl::List(url), group, groupId);
 }
 
-void ClipManager::slotAddXmlClipFile(const QString name, const QDomElement xml, const QString group, const QString &groupId)
+void ClipManager::slotAddXmlClipFile(const QString &name, const QDomElement &xml, const QString &group, const QString &groupId)
 {
     QDomDocument doc;
     doc.appendChild(doc.importNode(xml, true));
@@ -362,7 +362,7 @@ void ClipManager::slotAddXmlClipFile(const QString name, const QDomElement xml,
     m_doc->commandStack()->push(command);
 }
 
-void ClipManager::slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const QString &groupId)
+void ClipManager::slotAddColorClipFile(const QString &name, const QString &color, QString duration, const QString &group, const QString &groupId)
 {
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
@@ -383,10 +383,10 @@ void ClipManager::slotAddColorClipFile(const QString name, const QString color,
     m_doc->commandStack()->push(command);
 }
 
-void ClipManager::slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration,
+void ClipManager::slotAddSlideshowClipFile(const QString &name, const QString &path, int count, const QString &duration,
         const bool loop, const bool crop, const bool fade,
         const QString &luma_duration, const QString &luma_file, const int softness,
-        const QString &animation, QString group, const QString &groupId)
+        const QString &animation, const QString &group, const QString &groupId)
 {
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
@@ -416,7 +416,7 @@ void ClipManager::slotAddSlideshowClipFile(const QString name, const QString pat
 
 
 
-void ClipManager::slotAddTextClipFile(const QString titleName, int out, const QString xml, const QString group, const QString &groupId)
+void ClipManager::slotAddTextClipFile(const QString &titleName, int out, const QString &xml, const QString &group, const QString &groupId)
 {
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
@@ -438,7 +438,7 @@ void ClipManager::slotAddTextClipFile(const QString titleName, int out, const QS
     m_doc->commandStack()->push(command);
 }
 
-void ClipManager::slotAddTextTemplateClip(QString titleName, const KUrl path, const QString group, const QString &groupId)
+void ClipManager::slotAddTextTemplateClip(QString titleName, const KUrl &path, const QString &group, const QString &groupId)
 {
     QDomDocument doc;
     QDomElement prod = doc.createElement("producer");
diff --git a/src/clipmanager.h b/src/clipmanager.h
index f9ac172..4bf78eb 100644
--- a/src/clipmanager.h
+++ b/src/clipmanager.h
@@ -70,22 +70,22 @@ Q_OBJECT public:
      * @param url file to add
      * @param group name of the group to insert the file in (can be empty)
      * @param groupId id of the group (if any) */
-    void slotAddClipFile(const KUrl url, const QString group, const QString &groupId);
+    void slotAddClipFile(const KUrl &url, const QString &group, const QString &groupId);
 
     /** @brief Adds a list of files to the project.
      * @param urls files to add
      * @param group name of the group to insert the files in (can be empty)
      * @param groupId id of the group (if any)
      * It checks for duplicated items and asks to the user for instructions. */
-    void slotAddClipList(const KUrl::List urls, const QString group, const QString &groupId);
-    void slotAddTextClipFile(const QString titleName, int out, const QString xml, const QString group, const QString &groupId);
-    void slotAddTextTemplateClip(QString titleName, const KUrl path, const QString group, const QString &groupId);
-    void slotAddXmlClipFile(const QString name, const QDomElement xml, const QString group, const QString &groupId);
-    void slotAddColorClipFile(const QString name, const QString color, QString duration, const QString group, const QString &groupId);
-    void slotAddSlideshowClipFile(const QString name, const QString path, int count, const QString duration,
+    void slotAddClipList(const KUrl::List urls, const QString &group, const QString &groupId);
+    void slotAddTextClipFile(const QString &titleName, int out, const QString &xml, const QString &group, const QString &groupId);
+    void slotAddTextTemplateClip(QString titleName, const KUrl &path, const QString &group, const QString &groupId);
+    void slotAddXmlClipFile(const QString &name, const QDomElement &xml, const QString &group, const QString &groupId);
+    void slotAddColorClipFile(const QString &name, const QString &color, QString duration, const QString &group, const QString &groupId);
+    void slotAddSlideshowClipFile(const QString &name, const QString &path, int count, const QString &duration,
                                   const bool loop, const bool crop,const bool fade,
                                   const QString &luma_duration, const QString &luma_file, const int softness,
-                                  const QString &animation, const QString group, const QString &groupId);
+                                  const QString &animation, const QString &group, const QString &groupId);
     DocClipBase *getClipById(QString clipId);
     const QList <DocClipBase *> getClipByResource(QString resource);
     void slotDeleteClips(QStringList ids);
-- 
1.7.5.4





More information about the Kdenlive mailing list