]> git.sesse.net Git - kdenlive/commitdiff
const'ref
authorMontel Laurent <montel@kde.org>
Thu, 16 May 2013 21:44:26 +0000 (23:44 +0200)
committerMontel Laurent <montel@kde.org>
Thu, 16 May 2013 21:44:26 +0000 (23:44 +0200)
src/abstractclipitem.h
src/archivewidget.cpp
src/clipitem.cpp
src/clipitem.h
src/definitions.h
src/dvdwizardmenu.cpp
src/dvdwizardmenu.h
src/stopmotion/stopmotion.h
src/transition.cpp
src/transition.h

index f2a5bed5484aaa1635b255ab452cdfa19cb2d449..4999a72f92e2a23750afd9a58369aacd010b1e01 100644 (file)
@@ -67,7 +67,7 @@ public:
     bool isItemLocked() const;
     void closeAnimation();
 
-    virtual OPERATIONTYPE operationMode(QPointF pos) = 0;
+    virtual OPERATIONTYPE operationMode(const QPointF &pos) = 0;
     virtual GenTime startPos() const ;
     virtual void setTrack(int track);
     virtual GenTime endPos() const ;
index 2b0327e65a33f0e28b0ff502cf89d98bf627b0f1..597044aad74e1548baecdd011c230819a94b12df 100644 (file)
@@ -832,9 +832,10 @@ void ArchiveWidget::createArchive()
     // Add project file
     bool result = false;
     if (m_temp) {
-       archive.addLocalFile(m_temp->fileName(), m_name + ".kdenlive");
-       result = archive.close();
-       delete m_temp;
+        archive.addLocalFile(m_temp->fileName(), m_name + ".kdenlive");
+        result = archive.close();
+        delete m_temp;
+        m_temp = 0;
     }
     emit archivingFinished(result);
 }
index 269e7a7642464eb5385f834c1595c9c95b07d362..cfddd99c64723eeab47cee59644bba2580ba42b2 100644 (file)
@@ -128,7 +128,8 @@ ClipItem::~ClipItem()
     blockSignals(true);
     m_endThumbTimer.stop();
     m_startThumbTimer.stop();
-    if (scene()) scene()->removeItem(this);
+    if (scene())
+        scene()->removeItem(this);
     if (m_clipType == VIDEO || m_clipType == AV || m_clipType == SLIDESHOW || m_clipType == PLAYLIST) {
         //disconnect(m_clip->thumbProducer(), SIGNAL(thumbReady(int,QImage)), this, SLOT(slotThumbReady(int,QImage)));
         //disconnect(m_clip, SIGNAL(gotAudioData()), this, SLOT(slotGotAudioData()));
@@ -337,15 +338,15 @@ void ClipItem::initEffect(QDomElement effect, int diff, int offset)
     }
 }
 
-const QString ClipItem::adjustKeyframes(QString keyframes, int offset)
+const QString ClipItem::adjustKeyframes(const QString &keyframes, int offset)
 {
     QStringList result;
     // Simple keyframes
     const QStringList list = keyframes.split(';', QString::SkipEmptyParts);
     foreach(const QString &keyframe, list) {
-       int pos = keyframe.section(':', 0, 0).toInt() - offset;
-       QString newKey = QString::number(pos) + ":" + keyframe.section(':', 1);
-       result.append(newKey);
+        int pos = keyframe.section(':', 0, 0).toInt() - offset;
+        QString newKey = QString::number(pos) + ":" + keyframe.section(':', 1);
+        result.append(newKey);
     }
     return result.join(";");
 }
@@ -426,7 +427,7 @@ bool ClipItem::checkKeyFrames(int width, int height, int previousDuration, int c
     return clipEffectsModified;
 }
 
-void ClipItem::setKeyframes(const int ix, const QStringList keyframes)
+void ClipItem::setKeyframes(const int ix, const QStringList &keyframes)
 {
     QDomElement effect = m_effectList.at(ix);
     if (effect.attribute("disable") == "1") return;
@@ -670,7 +671,7 @@ void ClipItem::slotSetEndThumb(const QImage &img)
     }
 }
 
-void ClipItem::slotThumbReady(int frame, QImage img)
+void ClipItem::slotThumbReady(int frame, const QImage &img)
 {
     if (scene() == NULL) return;
     QRectF r = boundingRect();
@@ -931,8 +932,8 @@ void ClipItem::paint(QPainter *painter,
     }
     
     if (m_isMainSelectedClip) {
-       framePen.setColor(Qt::red);
-       textBgColor = Qt::red;
+        framePen.setColor(Qt::red);
+        textBgColor = Qt::red;
     }
 
     // only paint details if clip is big enough
@@ -1057,7 +1058,7 @@ void ClipItem::paint(QPainter *painter,
 }
 
 
-OPERATIONTYPE ClipItem::operationMode(QPointF pos)
+OPERATIONTYPE ClipItem::operationMode(const QPointF &pos)
 {
     if (isItemLocked()) return NONE;
     const double scale = projectScene()->scale().x();
index d71ebb5ecceb7ad84467c6ec8ac17e03efb45140..72eb0d4a8f18049b29c63bd9fdfd7fb6556036d1 100644 (file)
@@ -54,7 +54,7 @@ public:
     virtual int type() const;
     void resizeStart(int posx, bool size = true, bool emitChange = true);
     void resizeEnd(int posx, bool emitChange = true);
-    OPERATIONTYPE operationMode(QPointF pos);
+    OPERATIONTYPE operationMode(const QPointF &pos);
     static int itemHeight();
     const QString clipProducer() const;
     int clipType() const;
@@ -149,7 +149,7 @@ public:
     /** @brief Sets params with keyframes and updates the visible keyframes.
     * @param ix Number of the effect
     * @param keyframes a list of strings of keyframes (one string per param), which should be used */
-    void setKeyframes(const int ix, const QStringList keyframes);
+    void setKeyframes(const int ix, const QStringList &keyframes);
     void setEffectList(const EffectsList effectList);
     void setSpeed(const double speed, int strobe);
     double speed() const;
@@ -161,7 +161,7 @@ public:
     int hasEffect(const QString &tag, const QString &id) const;
 
     /** @brief Adjust keyframes to the new clip. */
-    const QString adjustKeyframes(QString keyframes, int offset);
+    const QString adjustKeyframes(const QString &keyframes, int offset);
     /** @brief Makes sure all keyframes are in the clip's cropped duration.
      * @param cutPos the frame number where the new clip starts
     * @return Whether or not changes were made */
@@ -253,7 +253,7 @@ private slots:
     void animate(qreal value);
     void slotSetStartThumb(const QImage &img);
     void slotSetEndThumb(const QImage &img);
-    void slotThumbReady(int frame, QImage img);
+    void slotThumbReady(int frame, const QImage &img);
     /** @brief The thumbnailer has finished to cache all required thumbs. */
     void slotGotThumbsCache();
 
index 20e87240665f32368d5722e1e3d416212dd23d6d..592156e192831d6e0327d27a201758ec3d8e2472 100644 (file)
@@ -242,7 +242,7 @@ public:
        if (!found) addParam(name, value);
     }
         
-    QString paramValue(const QString &name, QString defaultValue = QString()) const {
+    QString paramValue(const QString &name, const QString &defaultValue = QString()) const {
         for (int i = 0; i < size(); ++i) {
             if (at(i).name() == name) return at(i).value();
         }
@@ -274,7 +274,7 @@ public:
     GenTime time() const          {
         return t;
     }
-    void    setComment(QString comm) {
+    void    setComment(const QString &comm) {
         c = comm;
     }
     void setMarkerType(int t) {
@@ -301,7 +301,7 @@ public:
              return Qt::cyan;
              break;
        }
-    };
+    }
 
     /* Implementation of > operator; Works identically as with basic types. */
     bool operator>(CommentedTime op) const {
@@ -332,9 +332,6 @@ private:
     GenTime t;
     QString c;
     int type;
-
-
-
 };
 
 QDebug operator << (QDebug qd, const ItemInfo &info);
index 89d20dcb99bc6ad313b32d2b29f7b0cdfe9eaea9..82e16c87817e72e64e3f1c5ae5403257e097ab33 100644 (file)
@@ -218,7 +218,7 @@ bool DvdWizardMenu::isComplete() const
     }
 
     if (!m_view.background_image->isHidden()) {
-        // Make sure user selected a valid image / video file
+        // Make sure user selected a valid image / video file
         if (!QFile::exists(m_view.background_image->url().path())) {
 #if KDE_IS_VERSION(4,7,0)
             m_menuMessage->setText(i18n("Missing background image"));
@@ -779,7 +779,7 @@ QDomElement DvdWizardMenu::toXml() const
 }
 
 
-void DvdWizardMenu::loadXml(DVDFORMAT format, QDomElement xml)
+void DvdWizardMenu::loadXml(DVDFORMAT format, const QDomElement &xml)
 {
     kDebug() << "// LOADING MENU";
     if (xml.isNull()) return;
index a67a1eedc252c64f3c301ad848fbc4338090a4ad..8a74612cc06fb6098bd94a7bbd0b8c9f93832003 100644 (file)
@@ -164,7 +164,7 @@ public:
     int menuMovieLength() const;
     void changeProfile(DVDFORMAT format);
     QDomElement toXml() const;
-    void loadXml(DVDFORMAT format, QDomElement xml);
+    void loadXml(DVDFORMAT format, const QDomElement &xml);
     void prepareUnderLines();
     void resetUnderLines();
 
index df5e0d2bd9ef0d9ca528a02e3520e5129ba7c23e..4c3489522f08ec0119edc71912a2df82e131cdae 100644 (file)
@@ -40,9 +40,9 @@ public:
     void setImage(const QImage &img);
 
 protected:
-    virtual void paintEvent(QPaintEvent* event);
-    virtual void wheelEvent(QWheelEvent* event);
-    virtual void mousePressEvent(QMouseEvent*);
+    void paintEvent(QPaintEvent* event);
+    void wheelEvent(QWheelEvent* event);
+    void mousePressEvent(QMouseEvent*);
 
 private:
     QImage m_img;
@@ -250,8 +250,8 @@ signals:
     /** @brief Ask to add sequence to current project. */
     void addOrUpdateSequence(const QString &);
 
-    void doCreateThumbs(QImage, int);
-    void gotFrame(QImage);
+    void doCreateThumbs(const QImage&, int);
+    void gotFrame(const QImage&);
 };
 
 #endif
index d43d56d85bb799e2486119dbd7fad0fe086daadb..0d7462dcf8d41528fd6c21d7df7f30adfb7a3be9 100644 (file)
@@ -289,7 +289,7 @@ QVariant Transition::itemChange(GraphicsItemChange change, const QVariant &value
 }
 
 
-OPERATIONTYPE Transition::operationMode(QPointF pos)
+OPERATIONTYPE Transition::operationMode(const QPointF &pos)
 {
     if (isItemLocked()) return NONE;
 
index aa9a9cae16fa81c87c3dc5127136b6c683b13373..4e92877440efce81a5719b7e55c1904c5bfb6cd2 100644 (file)
@@ -55,7 +55,7 @@ public:
     int transitionEndTrack() const;
     QString transitionTag() const;
     QStringList transitionInfo() const;
-    OPERATIONTYPE operationMode(QPointF pos);
+    OPERATIONTYPE operationMode(const QPointF &pos);
     static int itemHeight();
     static int itemOffset();
     //const QMap < QString, QString > transitionParameters() const;