From 054ff5c40ed015661e7cea3eaf683239e5b0839a Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Sun, 12 May 2013 11:55:27 +0200 Subject: [PATCH] const'ify --- src/effectstack/effectstackview2.cpp | 2 +- src/effectstack/effectstackview2.h | 2 +- src/effectstack/parametercontainer.cpp | 2 +- src/effectstack/parametercontainer.h | 4 ++-- src/projecttree/meltjob.cpp | 2 +- src/projecttree/meltjob.h | 2 +- src/projecttree/proxyclipjob.cpp | 2 +- src/projecttree/proxyclipjob.h | 2 +- src/stopmotion/stopmotion.cpp | 2 +- src/stopmotion/stopmotion.h | 2 +- src/v4l/v4lcapture.cpp | 2 +- src/v4l/v4lcapture.h | 2 +- thumbnailer/westleypreview.cpp | 2 +- thumbnailer/westleypreview.h | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/effectstack/effectstackview2.cpp b/src/effectstack/effectstackview2.cpp index 45493e3f..2b55bbd7 100644 --- a/src/effectstack/effectstackview2.cpp +++ b/src/effectstack/effectstackview2.cpp @@ -952,7 +952,7 @@ void EffectStackView2::dropEvent(QDropEvent *event) processDroppedEffect(doc.documentElement(), event); } -void EffectStackView2::setKeyframes(const QString data, int maximum) +void EffectStackView2::setKeyframes(const QString &data, int maximum) { for (int i = 0; i < m_effects.count(); i++) { if (m_effects.at(i)->isActive()) { diff --git a/src/effectstack/effectstackview2.h b/src/effectstack/effectstackview2.h index 85a2163d..f6d2bad1 100644 --- a/src/effectstack/effectstackview2.h +++ b/src/effectstack/effectstackview2.h @@ -76,7 +76,7 @@ public: static const QString getStyleSheet(); /** @brief Import keyframes from the clip metadata */ - void setKeyframes(const QString data, int maximum); + void setKeyframes(const QString &data, int maximum); protected: virtual void mouseMoveEvent(QMouseEvent * event); diff --git a/src/effectstack/parametercontainer.cpp b/src/effectstack/parametercontainer.cpp index be7b3965..953bdf5a 100644 --- a/src/effectstack/parametercontainer.cpp +++ b/src/effectstack/parametercontainer.cpp @@ -95,7 +95,7 @@ class Fontval: public QWidget, public Ui::Fontval_UI }; -ParameterContainer::ParameterContainer(QDomElement effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent) : +ParameterContainer::ParameterContainer(const QDomElement &effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent) : m_keyframeEditor(NULL), m_geometryWidget(NULL), m_metaInfo(metaInfo), diff --git a/src/effectstack/parametercontainer.h b/src/effectstack/parametercontainer.h index aa0e2478..65c048b4 100644 --- a/src/effectstack/parametercontainer.h +++ b/src/effectstack/parametercontainer.h @@ -47,7 +47,7 @@ class MySpinBox : public QSpinBox Q_OBJECT public: - MySpinBox(QWidget * parent = 0); + explicit MySpinBox(QWidget * parent = 0); protected: virtual void focusInEvent(QFocusEvent*); @@ -59,7 +59,7 @@ class ParameterContainer : public QObject Q_OBJECT public: - ParameterContainer(QDomElement effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent = 0); + ParameterContainer(const QDomElement &effect, ItemInfo info, EffectMetaInfo *metaInfo, QWidget * parent = 0); ~ParameterContainer(); void updateTimecodeFormat(); void updateProjectFormat(MltVideoProfile profile, Timecode t); diff --git a/src/projecttree/meltjob.cpp b/src/projecttree/meltjob.cpp index 5ef79396..6ddaa28f 100644 --- a/src/projecttree/meltjob.cpp +++ b/src/projecttree/meltjob.cpp @@ -35,7 +35,7 @@ static void consumer_frame_render(mlt_consumer, MeltJob * self, mlt_frame frame_ self->emitFrameNumber((int) frame.get_position()); } -MeltJob::MeltJob(CLIPTYPE cType, const QString &id, QStringList parameters, QMap extraParams) : AbstractClipJob(MLTJOB, cType, id, parameters), +MeltJob::MeltJob(CLIPTYPE cType, const QString &id, const QStringList ¶meters, const QMap &extraParams) : AbstractClipJob(MLTJOB, cType, id, parameters), addClipToProject(0), m_consumer(NULL), m_producer(NULL), diff --git a/src/projecttree/meltjob.h b/src/projecttree/meltjob.h index 22dd0344..82326d81 100644 --- a/src/projecttree/meltjob.h +++ b/src/projecttree/meltjob.h @@ -41,7 +41,7 @@ class MeltJob : public AbstractClipJob Q_OBJECT public: - MeltJob(CLIPTYPE cType, const QString &id, QStringList parameters, stringMap extraParams = stringMap()); + MeltJob(CLIPTYPE cType, const QString &id, const QStringList& parameters, const stringMap& extraParams = stringMap()); virtual ~ MeltJob(); const QString destination() const; void startJob(); diff --git a/src/projecttree/proxyclipjob.cpp b/src/projecttree/proxyclipjob.cpp index 7ef2906f..ca498f3d 100644 --- a/src/projecttree/proxyclipjob.cpp +++ b/src/projecttree/proxyclipjob.cpp @@ -25,7 +25,7 @@ #include #include -ProxyJob::ProxyJob(CLIPTYPE cType, const QString &id, QStringList parameters) : AbstractClipJob(PROXYJOB, cType, id, parameters), +ProxyJob::ProxyJob(CLIPTYPE cType, const QString &id, const QStringList& parameters) : AbstractClipJob(PROXYJOB, cType, id, parameters), m_jobDuration(0), m_isFfmpegJob(true) { diff --git a/src/projecttree/proxyclipjob.h b/src/projecttree/proxyclipjob.h index beca4b1e..935c4fe9 100644 --- a/src/projecttree/proxyclipjob.h +++ b/src/projecttree/proxyclipjob.h @@ -32,7 +32,7 @@ class ProxyJob : public AbstractClipJob Q_OBJECT public: - ProxyJob(CLIPTYPE cType, const QString &id, QStringList parameters); + ProxyJob(CLIPTYPE cType, const QString &id, const QStringList& parameters); virtual ~ ProxyJob(); const QString destination() const; void startJob(); diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp index 866d6f27..83060e08 100644 --- a/src/stopmotion/stopmotion.cpp +++ b/src/stopmotion/stopmotion.cpp @@ -139,7 +139,7 @@ void StopmotionMonitor::slotMouseSeek(int /*eventDelta*/, bool /*fast*/) { } -StopmotionWidget::StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, QList< QAction* > actions, QWidget* parent) : +StopmotionWidget::StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, const QList &actions, QWidget* parent) : QDialog(parent) , Ui::Stopmotion_UI() , m_projectFolder(projectFolder) diff --git a/src/stopmotion/stopmotion.h b/src/stopmotion/stopmotion.h index 7d89befd..bbda1a6f 100644 --- a/src/stopmotion/stopmotion.h +++ b/src/stopmotion/stopmotion.h @@ -92,7 +92,7 @@ public: * @param projectFolder The current project folder, where captured files will be stored. * @param actions The actions for this widget that can have a keyboard shortcut. * @param parent (optional) parent widget */ - StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, QList< QAction* > actions, QWidget* parent = 0); + StopmotionWidget(MonitorManager *manager, const KUrl &projectFolder, const QList< QAction* > &actions, QWidget* parent = 0); virtual ~StopmotionWidget(); protected: diff --git a/src/v4l/v4lcapture.cpp b/src/v4l/v4lcapture.cpp index d95bf702..bee35725 100644 --- a/src/v4l/v4lcapture.cpp +++ b/src/v4l/v4lcapture.cpp @@ -44,7 +44,7 @@ V4lCaptureHandler::V4lCaptureHandler() //static -QStringList V4lCaptureHandler::getDeviceName(QString input) +QStringList V4lCaptureHandler::getDeviceName(const QString &input) { char *src = strdup(input.toUtf8().constData()); diff --git a/src/v4l/v4lcapture.h b/src/v4l/v4lcapture.h index 915b517b..9a742f65 100644 --- a/src/v4l/v4lcapture.h +++ b/src/v4l/v4lcapture.h @@ -32,7 +32,7 @@ class V4lCaptureHandler public: V4lCaptureHandler(); - static QStringList getDeviceName(QString input); + static QStringList getDeviceName(const QString &input); }; diff --git a/thumbnailer/westleypreview.cpp b/thumbnailer/westleypreview.cpp index 91132787..4fab7b4e 100644 --- a/thumbnailer/westleypreview.cpp +++ b/thumbnailer/westleypreview.cpp @@ -117,7 +117,7 @@ QImage MltPreview::getFrame(Mlt::Producer *producer, int framepos, int /*width*/ } -uint MltPreview::imageVariance(QImage image) +uint MltPreview::imageVariance(const QImage &image) { if (image.isNull()) return 0; uint delta = 0; diff --git a/thumbnailer/westleypreview.h b/thumbnailer/westleypreview.h index ca974c4e..29014601 100644 --- a/thumbnailer/westleypreview.h +++ b/thumbnailer/westleypreview.h @@ -41,7 +41,7 @@ public: virtual Flags flags() const; protected: - static uint imageVariance(QImage image); + static uint imageVariance(const QImage &image); QImage getFrame(Mlt::Producer* producer, int framepos, int width, int height); }; -- 2.39.2