[Kdenlive-devel] [PATCH kdenlive 18/27] const parameter as reference

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


Found by cppcheck.
---
 src/mainwindow.cpp              |    2 +-
 src/mltdevicecapture.h          |    2 +-
 src/stopmotion/capturehandler.h |    2 +-
 src/stopmotion/stopmotion.cpp   |   10 +++++-----
 src/stopmotion/stopmotion.h     |    6 +++---
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ae32c9b..016a904 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4302,7 +4302,7 @@ void MainWindow::slotOpenStopmotion()
 {
     if (m_stopmotion == NULL) {
         m_stopmotion = new StopmotionWidget(m_monitorManager, m_activeDocument->projectFolder(), m_stopmotion_actions->actions(), this);
-        connect(m_stopmotion, SIGNAL(addOrUpdateSequence(const QString)), m_projectList, SLOT(slotAddOrUpdateSequence(const QString)));
+        connect(m_stopmotion, SIGNAL(addOrUpdateSequence(const QString &)), m_projectList, SLOT(slotAddOrUpdateSequence(const QString)));
         //for (int i = 0; i < m_gfxScopesList.count(); i++) {
             // Check if we need the renderer to send a new frame for update
             /*if (!m_scopesList.at(i)->widget()->visibleRegion().isEmpty() && !(static_cast<AbstractScopeWidget *>(m_scopesList.at(i)->widget())->autoRefreshEnabled())) request = true;*/
diff --git a/src/mltdevicecapture.h b/src/mltdevicecapture.h
index 9603326..30d695c 100644
--- a/src/mltdevicecapture.h
+++ b/src/mltdevicecapture.h
@@ -139,7 +139,7 @@ signals:
     /** @brief This signal contains the audio of the current frame. */
     void audioSamplesSignal(const QVector<int16_t>&, int freq, int num_channels, int num_samples);
 
-    void frameSaved(const QString);
+    void frameSaved(const QString &);
     
     void droppedFrames(int);
     
diff --git a/src/stopmotion/capturehandler.h b/src/stopmotion/capturehandler.h
index 9e1e350..b2ea249 100644
--- a/src/stopmotion/capturehandler.h
+++ b/src/stopmotion/capturehandler.h
@@ -52,7 +52,7 @@ protected:
 signals:
     void gotTimeCode(ulong);
     void gotMessage(const QString &);
-    void frameSaved(const QString);
+    void frameSaved(const QString &);
     void gotFrame(QImage);
 };
 
diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp
index a018fe7..f76f9c2 100644
--- a/src/stopmotion/stopmotion.cpp
+++ b/src/stopmotion/stopmotion.cpp
@@ -276,7 +276,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder,
 
     connect(capture_device, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDeviceHandler()));
     /*if (m_bmCapture) {
-        connect(m_bmCapture, SIGNAL(frameSaved(const QString)), this, SLOT(slotNewThumb(const QString)));
+        connect(m_bmCapture, SIGNAL(frameSaved(const QString &)), this, SLOT(slotNewThumb(const QString &)));
         connect(m_bmCapture, SIGNAL(gotFrame(QImage)), this, SIGNAL(gotFrame(QImage)));
     } else live_button->setEnabled(false);*/
 
@@ -303,7 +303,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder,
     m_captureDevice = new MltDeviceCapture(profilePath, m_videoBox, this);
     m_captureDevice->sendFrameForAnalysis = KdenliveSettings::analyse_stopmotion();
     m_monitor->setRender(m_captureDevice);
-    connect(m_captureDevice, SIGNAL(frameSaved(const QString)), this, SLOT(slotNewThumb(const QString)));
+    connect(m_captureDevice, SIGNAL(frameSaved(const QString &)), this, SLOT(slotNewThumb(const QString &)));
 
     live_button->setChecked(false);
     button_addsequence->setEnabled(false);
@@ -488,7 +488,7 @@ void StopmotionWidget::slotLive(bool isOn)
             m_captureDevice = new MltDeviceCapture(profilePath, m_videoBox, this);
             m_captureDevice->sendFrameForAnalysis = KdenliveSettings::analyse_stopmotion();
             m_monitor->setRender(m_captureDevice);
-            connect(m_captureDevice, SIGNAL(frameSaved(const QString)), this, SLOT(slotNewThumb(const QString)));
+            connect(m_captureDevice, SIGNAL(frameSaved(const QString &)), this, SLOT(slotNewThumb(const QString &)));
         }
 
         m_manager->activateMonitor("stopmotion");
@@ -664,7 +664,7 @@ void StopmotionWidget::slotPreNotify()
 }
 
 
-void StopmotionWidget::slotNewThumb(const QString path)
+void StopmotionWidget::slotNewThumb(const QString &path)
 {
     if (!KdenliveSettings::showstopmotionthumbs()) return;
     m_filesList.append(path);
@@ -883,7 +883,7 @@ void StopmotionWidget::slotSwitchMirror(bool isOn)
     if (m_captureDevice) m_captureDevice->mirror(isOn);
 }
 
-const QString StopmotionWidget::createProducer(MltVideoProfile profile, const QString service, const QString resource)
+const QString StopmotionWidget::createProducer(MltVideoProfile profile, const QString &service, const QString &resource)
 {
     Q_UNUSED(profile)
 
diff --git a/src/stopmotion/stopmotion.h b/src/stopmotion/stopmotion.h
index 1ddb4c5..3e11527 100644
--- a/src/stopmotion/stopmotion.h
+++ b/src/stopmotion/stopmotion.h
@@ -152,7 +152,7 @@ private:
     StopmotionMonitor *m_monitor;
 
     /** @brief Create the XML playlist. */
-    const QString createProducer(MltVideoProfile profile, const QString service, const QString resource);
+    const QString createProducer(MltVideoProfile profile, const QString &service, const QString &resource);
 
     /** @brief A new frame arrived, reload overlay. */
     void reloadOverlay();
@@ -225,7 +225,7 @@ private slots:
     void slotConfigure();
 
     /** @brief Prepare to crete thumb for newly captured frame. */
-    void slotNewThumb(const QString path);
+    void slotNewThumb(const QString &path);
 
     /** @brief Set the effect to be applied to overlay frame. */
     void slotUpdateOverlayEffect(QAction* act);
@@ -247,7 +247,7 @@ private slots:
 
 signals:
     /** @brief Ask to add sequence to current project. */
-    void addOrUpdateSequence(const QString);
+    void addOrUpdateSequence(const QString &);
 
     void doCreateThumbs(QImage, int);
     void gotFrame(QImage);
-- 
1.7.5.4





More information about the Kdenlive mailing list