]> git.sesse.net Git - kdenlive/commitdiff
const'ify/use reference. Remove unused variable
authorMontel Laurent <montel@kde.org>
Sun, 12 May 2013 18:00:56 +0000 (20:00 +0200)
committerMontel Laurent <montel@kde.org>
Sun, 12 May 2013 18:00:56 +0000 (20:00 +0200)
src/abstractclipitem.cpp
src/abstractclipitem.h
src/archivewidget.cpp
src/archivewidget.h
src/unicodedialog.cpp
src/unicodedialog.h

index 0abf87aa6a116cfd4e2a851f1324904be74ccee6..b333427f27cadd9463508bfbd1b9d31464905436 100644 (file)
@@ -261,7 +261,7 @@ GenTime AbstractClipItem::maxDuration() const
     return m_maxDuration;
 }
 
-void AbstractClipItem::drawKeyFrames(QPainter *painter, const QTransform transformation, bool limitedKeyFrames)
+void AbstractClipItem::drawKeyFrames(QPainter *painter, const QTransform &transformation, bool limitedKeyFrames)
 {
     if (m_keyframes.count() < 1)
         return;
index db71b10ee982e0139e9d31711daf613430e39875..4d26679cac3e8ffcac2f25440f99129417613f17 100644 (file)
@@ -127,7 +127,7 @@ protected:
       *        "simplekeyframe" type, the effect always starts on clip start and ends on clip end. With the
       *        "keyframe" type, the effect starts on the first keyframe and ends on the last keyframe
       */
-    void drawKeyFrames(QPainter *painter, const QTransform transformation, bool limitedKeyFrames);
+    void drawKeyFrames(QPainter *painter, const QTransform &transformation, bool limitedKeyFrames);
     int mouseOverKeyFrames(QPointF pos, double maxOffset);
     virtual void mousePressEvent(QGraphicsSceneMouseEvent * event);
 
index 14ef2b75d9860e4258c6e78e5b83ecbbd6d6f44e..e942b1524e66309e1ca066a2a414c70700a067c5 100644 (file)
@@ -325,7 +325,7 @@ bool ArchiveWidget::closeAccepted()
 }
 
 
-void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QStringList items)
+void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, const QStringList& items)
 {
     QStringList filesList;
     QString fileName;
@@ -343,7 +343,6 @@ void ArchiveWidget::generateItems(QTreeWidgetItem *parentItem, QStringList items
             if (slideUrl.fileName().startsWith(".all.")) {
                 // mimetype slideshow (for example *.png)
                     QStringList filters;
-                    QString extension;
                     // TODO: improve jpeg image detection with extension like jpeg, requires change in MLT image producers
                     filters << "*." + slideUrl.fileName().section('.', -1);
                     dir.setNameFilters(filters);
index bc79c09f43cac9013ed3687a5f6c309fc4bae66f..0f09084f1970c603ef42943e4cc395b36e3acdfa 100644 (file)
@@ -107,7 +107,7 @@ private:
 #endif
 
     /** @brief Generate tree widget subitems from a string list of urls. */
-    void generateItems(QTreeWidgetItem *parentItem, QStringList items);
+    void generateItems(QTreeWidgetItem *parentItem, const QStringList &items);
     /** @brief Generate tree widget subitems from a map of clip ids / urls. */
     void generateItems(QTreeWidgetItem *parentItem, const QMap<QString, QString> &items);
     /** @brief Replace urls in project file. */
index 7576c3b2c9d7258c0c05722c79984f8c7096764b..1a954897a4f1c524dc0bc25b4d4c82a06adc69cb 100644 (file)
@@ -73,7 +73,7 @@ void UnicodeDialog::showLastUnicode()
     slotTextChanged(m_lastUnicodeNumber);
 }
 
-bool UnicodeDialog::controlCharacter(QString text)
+bool UnicodeDialog::controlCharacter(const QString &text)
 {
     bool isControlCharacter = false;
     QString t = text.toLower();
index 4a8579a2048955461a1f4ded227e8690b3ab093f..ba84005d15e9d98e3b3c22beefa0e6cb53d724d6 100644 (file)
@@ -48,7 +48,7 @@ private:
     /** \brief Removes all leading zeros */
     QString trimmedUnicodeNumber(QString text);
     /** \brief Checks whether the given string is a control character */
-    bool controlCharacter(QString text);
+    bool controlCharacter(const QString& text);
     /** \brief Checks whether the given uint is a control character */
     bool controlCharacter(uint value);