From: Montel Laurent Date: Mon, 13 May 2013 07:45:50 +0000 (+0200) Subject: const'ref X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f4699aef75ea62acb69ad499317493facdef04df;p=kdenlive const'ref --- diff --git a/src/beziercurve/bpoint.cpp b/src/beziercurve/bpoint.cpp index 2618254e..d45488df 100644 --- a/src/beziercurve/bpoint.cpp +++ b/src/beziercurve/bpoint.cpp @@ -27,7 +27,7 @@ BPoint::BPoint() : { } -BPoint::BPoint(QPointF handle1, QPointF point, QPointF handle2) : +BPoint::BPoint(const QPointF &handle1, const QPointF &point, const QPointF &handle2) : h1(handle1), p(point), h2(handle2) @@ -52,7 +52,7 @@ bool BPoint::operator==(const BPoint& point) const point.h2 == h2; } -void BPoint::setP(QPointF point, bool updateHandles) +void BPoint::setP(const QPointF &point, bool updateHandles) { QPointF offset = point - p; p = point; @@ -62,7 +62,7 @@ void BPoint::setP(QPointF point, bool updateHandles) } } -void BPoint::setH1(QPointF handle1) +void BPoint::setH1(const QPointF &handle1) { h1 = handle1; if (handlesLinked) { @@ -73,7 +73,7 @@ void BPoint::setH1(QPointF handle1) } } -void BPoint::setH2(QPointF handle2) +void BPoint::setH2(const QPointF &handle2) { h2 = handle2; if (handlesLinked) { diff --git a/src/beziercurve/bpoint.h b/src/beziercurve/bpoint.h index 2bd1fa29..995496cc 100644 --- a/src/beziercurve/bpoint.h +++ b/src/beziercurve/bpoint.h @@ -31,7 +31,7 @@ public: /** @brief Sets the point to -1, -1 to mark it as unusable (until point + handles have proper values) */ BPoint(); /** @brief Sets up according to the params. Linking detecting is done using autoSetLinked(). */ - BPoint(QPointF handle1, QPointF point, QPointF handle2); + BPoint(const QPointF &handle1, const QPointF &point, const QPointF &handle2); /** @brief Returns h1 if i = 0, p if i = 1, h2 if i = 2. */ QPointF &operator[](int i); @@ -41,17 +41,17 @@ public: /** @brief Sets p to @param point. * @param updateHandles (default = true) Whether to make sure the handles keep their position relative to p. */ - void setP(QPointF point, bool updateHandles = true); + void setP(const QPointF &point, bool updateHandles = true); /** @brief Sets h1 to @param handle1. * * If handlesLinked is true h2 is updated. */ - void setH1(QPointF handle1); + void setH1(const QPointF &handle1); /** @brief Sets h2 to @param handle2. * * If handlesLinked is true h1 is updated. */ - void setH2(QPointF handle2); + void setH2(const QPointF &handle2); void keepInRange(qreal xMin, qreal xMax); /** @brief Sets handlesLinked to true if the handles are in a linked state (line through h1, p, h2) otherwise to false. */ diff --git a/src/commands/addmarkercommand.cpp b/src/commands/addmarkercommand.cpp index 376ff81e..f315f3f4 100644 --- a/src/commands/addmarkercommand.cpp +++ b/src/commands/addmarkercommand.cpp @@ -21,7 +21,7 @@ #include -AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const CommentedTime oldMarker, const CommentedTime newMarker, const QString &id, QUndoCommand * parent) : +AddMarkerCommand::AddMarkerCommand(CustomTrackView *view, const CommentedTime &oldMarker, const CommentedTime &newMarker, const QString &id, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_oldMarker(oldMarker), diff --git a/src/commands/addmarkercommand.h b/src/commands/addmarkercommand.h index 12ef595d..f89ca937 100644 --- a/src/commands/addmarkercommand.h +++ b/src/commands/addmarkercommand.h @@ -32,7 +32,7 @@ class CustomTrackView; class AddMarkerCommand : public QUndoCommand { public: - AddMarkerCommand(CustomTrackView *view, const CommentedTime oldMarker, const CommentedTime newMarker, const QString &id, QUndoCommand * parent = 0); + AddMarkerCommand(CustomTrackView *view, const CommentedTime &oldMarker, const CommentedTime &newMarker, const QString &id, QUndoCommand * parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/addtrackcommand.cpp b/src/commands/addtrackcommand.cpp index fa8b5692..135139f5 100644 --- a/src/commands/addtrackcommand.cpp +++ b/src/commands/addtrackcommand.cpp @@ -23,7 +23,7 @@ #include -AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, TrackInfo info, bool addTrack, QUndoCommand * parent) : +AddTrackCommand::AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo &info, bool addTrack, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_ix(ix), diff --git a/src/commands/addtrackcommand.h b/src/commands/addtrackcommand.h index 3e54191d..acb4f480 100644 --- a/src/commands/addtrackcommand.h +++ b/src/commands/addtrackcommand.h @@ -33,7 +33,7 @@ class CustomTrackView; class AddTrackCommand : public QUndoCommand { public: - AddTrackCommand(CustomTrackView *view, int ix, TrackInfo info, bool addTrack, QUndoCommand * parent = 0); + AddTrackCommand(CustomTrackView *view, int ix, const TrackInfo &info, bool addTrack, QUndoCommand * parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/addtransitioncommand.cpp b/src/commands/addtransitioncommand.cpp index 22912c32..6e372bb2 100644 --- a/src/commands/addtransitioncommand.cpp +++ b/src/commands/addtransitioncommand.cpp @@ -21,7 +21,7 @@ #include -AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, const QDomElement ¶ms, bool remove, bool doIt, QUndoCommand * parent) : +AddTransitionCommand::AddTransitionCommand(CustomTrackView *view, const ItemInfo &info, int transitiontrack, const QDomElement ¶ms, bool remove, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_info(info), diff --git a/src/commands/addtransitioncommand.h b/src/commands/addtransitioncommand.h index 5a5a6f54..5531b79c 100644 --- a/src/commands/addtransitioncommand.h +++ b/src/commands/addtransitioncommand.h @@ -32,7 +32,7 @@ class CustomTrackView; class AddTransitionCommand : public QUndoCommand { public: - AddTransitionCommand(CustomTrackView *view, ItemInfo info, int transitiontrack, const QDomElement ¶ms, bool remove, bool doIt, QUndoCommand * parent = 0); + AddTransitionCommand(CustomTrackView *view, const ItemInfo &info, int transitiontrack, const QDomElement ¶ms, bool remove, bool doIt, QUndoCommand * parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/changeeffectstatecommand.cpp b/src/commands/changeeffectstatecommand.cpp index d62d02be..49269f84 100644 --- a/src/commands/changeeffectstatecommand.cpp +++ b/src/commands/changeeffectstatecommand.cpp @@ -23,7 +23,7 @@ #include -ChangeEffectStateCommand::ChangeEffectStateCommand(CustomTrackView *view, const int track, GenTime pos, const QList & effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent) : +ChangeEffectStateCommand::ChangeEffectStateCommand(CustomTrackView *view, const int track, const GenTime& pos, const QList & effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_track(track), diff --git a/src/commands/changeeffectstatecommand.h b/src/commands/changeeffectstatecommand.h index ee2c7d0b..f92517be 100644 --- a/src/commands/changeeffectstatecommand.h +++ b/src/commands/changeeffectstatecommand.h @@ -31,7 +31,7 @@ class CustomTrackView; class ChangeEffectStateCommand : public QUndoCommand { public: - ChangeEffectStateCommand(CustomTrackView *view, const int track, GenTime pos, const QList & effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0); + ChangeEffectStateCommand(CustomTrackView *view, const int track, const GenTime &pos, const QList & effectIndexes, bool disable, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/editeffectcommand.cpp b/src/commands/editeffectcommand.cpp index 841e129f..dd9c00d3 100644 --- a/src/commands/editeffectcommand.cpp +++ b/src/commands/editeffectcommand.cpp @@ -23,7 +23,7 @@ #include -EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, const QDomElement &oldeffect, const QDomElement &effect, int stackPos, bool refreshEffectStack, bool doIt, QUndoCommand *parent) : +EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, const GenTime &pos, const QDomElement &oldeffect, const QDomElement &effect, int stackPos, bool refreshEffectStack, bool doIt, QUndoCommand *parent) : QUndoCommand(parent), m_view(view), m_track(track), diff --git a/src/commands/editeffectcommand.h b/src/commands/editeffectcommand.h index 2c7719ea..8d63c86f 100644 --- a/src/commands/editeffectcommand.h +++ b/src/commands/editeffectcommand.h @@ -31,7 +31,7 @@ class CustomTrackView; class EditEffectCommand : public QUndoCommand { public: - EditEffectCommand(CustomTrackView *view, const int track, GenTime pos, const QDomElement &oldeffect, const QDomElement &effect, int stackPos, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0); + EditEffectCommand(CustomTrackView *view, const int track, const GenTime &pos, const QDomElement &oldeffect, const QDomElement &effect, int stackPos, bool refreshEffectStack, bool doIt, QUndoCommand *parent = 0); virtual int id() const; virtual bool mergeWith(const QUndoCommand * command); diff --git a/src/commands/edittransitioncommand.cpp b/src/commands/edittransitioncommand.cpp index 56ca9aec..8ec2a87c 100644 --- a/src/commands/edittransitioncommand.cpp +++ b/src/commands/edittransitioncommand.cpp @@ -20,7 +20,7 @@ #include -EditTransitionCommand::EditTransitionCommand(CustomTrackView *view, const int track, GenTime pos, const QDomElement &oldeffect, const QDomElement &effect, bool doIt, QUndoCommand * parent) : +EditTransitionCommand::EditTransitionCommand(CustomTrackView *view, const int track, const GenTime &pos, const QDomElement &oldeffect, const QDomElement &effect, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), diff --git a/src/commands/edittransitioncommand.h b/src/commands/edittransitioncommand.h index e331cd96..7836b358 100644 --- a/src/commands/edittransitioncommand.h +++ b/src/commands/edittransitioncommand.h @@ -28,7 +28,7 @@ class CustomTrackView; class EditTransitionCommand : public QUndoCommand { public: - EditTransitionCommand(CustomTrackView *view, const int track, GenTime pos, const QDomElement &oldeffect, const QDomElement &effect, bool doIt, QUndoCommand * parent = NULL); + EditTransitionCommand(CustomTrackView *view, const int track, const GenTime &pos, const QDomElement &oldeffect, const QDomElement &effect, bool doIt, QUndoCommand * parent = NULL); virtual int id() const; virtual bool mergeWith(const QUndoCommand * command); diff --git a/src/commands/moveclipcommand.cpp b/src/commands/moveclipcommand.cpp index 5fba133a..1ab92312 100644 --- a/src/commands/moveclipcommand.cpp +++ b/src/commands/moveclipcommand.cpp @@ -24,7 +24,7 @@ #include -MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : +MoveClipCommand::MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), diff --git a/src/commands/moveclipcommand.h b/src/commands/moveclipcommand.h index 3ab20cb2..0159ad42 100644 --- a/src/commands/moveclipcommand.h +++ b/src/commands/moveclipcommand.h @@ -31,7 +31,7 @@ class CustomTrackView; class MoveClipCommand : public QUndoCommand { public: - MoveClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent = 0); + MoveClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/moveeffectcommand.cpp b/src/commands/moveeffectcommand.cpp index c0771288..ba394793 100644 --- a/src/commands/moveeffectcommand.cpp +++ b/src/commands/moveeffectcommand.cpp @@ -23,7 +23,7 @@ #include -MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, GenTime pos, const QList &oldPos, int newPos, QUndoCommand * parent) : +MoveEffectCommand::MoveEffectCommand(CustomTrackView *view, const int track, const GenTime &pos, const QList &oldPos, int newPos, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_track(track), diff --git a/src/commands/moveeffectcommand.h b/src/commands/moveeffectcommand.h index e4aa6d70..ee86ffb2 100644 --- a/src/commands/moveeffectcommand.h +++ b/src/commands/moveeffectcommand.h @@ -31,7 +31,7 @@ class CustomTrackView; class MoveEffectCommand : public QUndoCommand { public: - MoveEffectCommand(CustomTrackView *view, const int track, GenTime pos, const QList &oldPos, int newPos, QUndoCommand * parent = 0); + MoveEffectCommand(CustomTrackView *view, const int track, const GenTime &pos, const QList &oldPos, int newPos, QUndoCommand * parent = 0); virtual int id() const; virtual bool mergeWith(const QUndoCommand * command); diff --git a/src/commands/movetransitioncommand.cpp b/src/commands/movetransitioncommand.cpp index f825ed77..629110f6 100644 --- a/src/commands/movetransitioncommand.cpp +++ b/src/commands/movetransitioncommand.cpp @@ -20,7 +20,7 @@ #include -MoveTransitionCommand::MoveTransitionCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent) : +MoveTransitionCommand::MoveTransitionCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), diff --git a/src/commands/movetransitioncommand.h b/src/commands/movetransitioncommand.h index 6c9dd00c..42f1967f 100644 --- a/src/commands/movetransitioncommand.h +++ b/src/commands/movetransitioncommand.h @@ -27,7 +27,7 @@ class CustomTrackView; class MoveTransitionCommand : public QUndoCommand { public: - MoveTransitionCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, QUndoCommand * parent = 0); + MoveTransitionCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, QUndoCommand * parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/rebuildgroupcommand.cpp b/src/commands/rebuildgroupcommand.cpp index 69a276cb..a80b2f4e 100644 --- a/src/commands/rebuildgroupcommand.cpp +++ b/src/commands/rebuildgroupcommand.cpp @@ -21,7 +21,7 @@ #include "rebuildgroupcommand.h" #include "customtrackview.h" -RebuildGroupCommand::RebuildGroupCommand(CustomTrackView* view, int childTrack, GenTime childPos, QUndoCommand* parent) : +RebuildGroupCommand::RebuildGroupCommand(CustomTrackView* view, int childTrack, const GenTime &childPos, QUndoCommand* parent) : QUndoCommand(parent), m_view(view), m_childTrack(childTrack), diff --git a/src/commands/rebuildgroupcommand.h b/src/commands/rebuildgroupcommand.h index bc3354fc..dbc80ef8 100644 --- a/src/commands/rebuildgroupcommand.h +++ b/src/commands/rebuildgroupcommand.h @@ -29,7 +29,7 @@ class CustomTrackView; class RebuildGroupCommand : public QUndoCommand { public: - RebuildGroupCommand(CustomTrackView *view, int childTrack, GenTime childPos, QUndoCommand* parent = 0); + RebuildGroupCommand(CustomTrackView *view, int childTrack, const GenTime &childPos, QUndoCommand* parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/resizeclipcommand.cpp b/src/commands/resizeclipcommand.cpp index dba66a94..a0103c06 100644 --- a/src/commands/resizeclipcommand.cpp +++ b/src/commands/resizeclipcommand.cpp @@ -23,7 +23,7 @@ #include -ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, bool dontWorry, QUndoCommand * parent) : +ResizeClipCommand::ResizeClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, bool dontWorry, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_startPos(start), diff --git a/src/commands/resizeclipcommand.h b/src/commands/resizeclipcommand.h index 9b5a4ae6..9e326e0f 100644 --- a/src/commands/resizeclipcommand.h +++ b/src/commands/resizeclipcommand.h @@ -34,7 +34,7 @@ class CustomTrackView; class ResizeClipCommand : public QUndoCommand { public: - ResizeClipCommand(CustomTrackView *view, const ItemInfo start, const ItemInfo end, bool doIt, bool dontWorry, QUndoCommand * parent = 0); + ResizeClipCommand(CustomTrackView *view, const ItemInfo &start, const ItemInfo &end, bool doIt, bool dontWorry, QUndoCommand * parent = 0); virtual void undo(); virtual void redo(); diff --git a/src/commands/splitaudiocommand.cpp b/src/commands/splitaudiocommand.cpp index cfe3aef0..e2507e63 100644 --- a/src/commands/splitaudiocommand.cpp +++ b/src/commands/splitaudiocommand.cpp @@ -23,7 +23,7 @@ #include -SplitAudioCommand::SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, EffectsList effects, QUndoCommand * parent) : +SplitAudioCommand::SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, const EffectsList &effects, QUndoCommand * parent) : QUndoCommand(parent), m_view(view), m_pos(pos), diff --git a/src/commands/splitaudiocommand.h b/src/commands/splitaudiocommand.h index 9cba6e91..b0eb0d38 100644 --- a/src/commands/splitaudiocommand.h +++ b/src/commands/splitaudiocommand.h @@ -34,7 +34,7 @@ class CustomTrackView; class SplitAudioCommand : public QUndoCommand { public: - SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, EffectsList effects, QUndoCommand * parent = 0); + SplitAudioCommand(CustomTrackView *view, const int track, const GenTime &pos, const EffectsList &effects, QUndoCommand * parent = 0); virtual void undo(); virtual void redo();