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

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


Found by cppcheck.
---
 src/abstractscopewidget.cpp       |    2 +-
 src/abstractscopewidget.h         |    2 +-
 src/audioscopes/audiospectrum.cpp |    2 +-
 src/audioscopes/audiospectrum.h   |    2 +-
 src/audioscopes/spectrogram.cpp   |    2 +-
 src/audioscopes/spectrogram.h     |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/abstractscopewidget.cpp b/src/abstractscopewidget.cpp
index 2ef642b..022063d 100644
--- a/src/abstractscopewidget.cpp
+++ b/src/abstractscopewidget.cpp
@@ -554,7 +554,7 @@ void AbstractScopeWidget::slotAutoRefreshToggled(bool autoRefresh)
     }
 }
 
-void AbstractScopeWidget::handleMouseDrag(const QPoint, const RescaleDirection, const Qt::KeyboardModifiers) { }
+void AbstractScopeWidget::handleMouseDrag(const QPoint &, const RescaleDirection, const Qt::KeyboardModifiers) { }
 
 
 #ifdef DEBUG_ASW
diff --git a/src/abstractscopewidget.h b/src/abstractscopewidget.h
index a251505..e518e1f 100644
--- a/src/abstractscopewidget.h
+++ b/src/abstractscopewidget.h
@@ -184,7 +184,7 @@ protected:
     /** The Abstract Scope will try to detect the movement direction when dragging on the widget with the mouse.
         As soon as the direction is determined it will execute this method. Can be used e.g. for re-scaling content.
         This is just a dummy function, re-implement to add functionality. */
-    virtual void handleMouseDrag(const QPoint movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers);
+    virtual void handleMouseDrag(const QPoint &movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers);
 
     ///// Reimplemented /////
 
diff --git a/src/audioscopes/audiospectrum.cpp b/src/audioscopes/audiospectrum.cpp
index ecab68f..eeb6a53 100644
--- a/src/audioscopes/audiospectrum.cpp
+++ b/src/audioscopes/audiospectrum.cpp
@@ -509,7 +509,7 @@ void AudioSpectrum::slotResetMaxFreq()
 
 ///// EVENTS /////
 
-void AudioSpectrum::handleMouseDrag(const QPoint movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers)
+void AudioSpectrum::handleMouseDrag(const QPoint &movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers)
 {
     if (rescaleDirection == North) {
         // Nort-South direction: Adjust the dB scale
diff --git a/src/audioscopes/audiospectrum.h b/src/audioscopes/audiospectrum.h
index a0d8d29..3f486c2 100644
--- a/src/audioscopes/audiospectrum.h
+++ b/src/audioscopes/audiospectrum.h
@@ -56,7 +56,7 @@ protected:
     virtual void readConfig();
     void writeConfig();
 
-    virtual void handleMouseDrag(const QPoint movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers);
+    virtual void handleMouseDrag(const QPoint &movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers);
 
 private:
     Ui::AudioSpectrum_UI *ui;
diff --git a/src/audioscopes/spectrogram.cpp b/src/audioscopes/spectrogram.cpp
index c075900..bf06833 100644
--- a/src/audioscopes/spectrogram.cpp
+++ b/src/audioscopes/spectrogram.cpp
@@ -444,7 +444,7 @@ bool Spectrogram::isHUDDependingOnInput() const { return false; }
 bool Spectrogram::isScopeDependingOnInput() const { return true; }
 bool Spectrogram::isBackgroundDependingOnInput() const { return false; }
 
-void Spectrogram::handleMouseDrag(const QPoint movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers)
+void Spectrogram::handleMouseDrag(const QPoint &movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers)
 {
     if (rescaleDirection == North) {
         // Nort-South direction: Adjust the dB scale
diff --git a/src/audioscopes/spectrogram.h b/src/audioscopes/spectrogram.h
index e95ba69..8d3f5f4 100644
--- a/src/audioscopes/spectrogram.h
+++ b/src/audioscopes/spectrogram.h
@@ -52,7 +52,7 @@ protected:
     bool isBackgroundDependingOnInput() const;
     virtual void readConfig();
     void writeConfig();
-    void handleMouseDrag(const QPoint movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers);
+    void handleMouseDrag(const QPoint &movement, const RescaleDirection rescaleDirection, const Qt::KeyboardModifiers rescaleModifiers);
     void resizeEvent(QResizeEvent *event);
 
 private:
-- 
1.7.5.4





More information about the Kdenlive mailing list