Commit 99a26ddd authored by Laurent Montel's avatar Laurent Montel 😁

Use const'ref

parent 6048a896
...@@ -1559,7 +1559,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion) ...@@ -1559,7 +1559,7 @@ bool DocumentValidator::upgrade(double version, const double currentVersion)
return true; return true;
} }
void DocumentValidator::convertKeyframeEffect(QDomElement effect, QStringList params, QMap <int, double> &values, int offset) void DocumentValidator::convertKeyframeEffect(const QDomElement &effect, const QStringList &params, QMap <int, double> &values, int offset)
{ {
QLocale locale; QLocale locale;
int in = effect.attribute(QStringLiteral("in")).toInt() - offset; int in = effect.attribute(QStringLiteral("in")).toInt() - offset;
...@@ -1944,7 +1944,7 @@ bool DocumentValidator::checkMovit() ...@@ -1944,7 +1944,7 @@ bool DocumentValidator::checkMovit()
return true; return true;
} }
QString DocumentValidator::factorizeGeomValue(QString value, double factor) QString DocumentValidator::factorizeGeomValue(const QString &value, double factor)
{ {
QStringList vals = value.split(QStringLiteral(";")); QStringList vals = value.split(QStringLiteral(";"));
QString result; QString result;
......
...@@ -59,10 +59,10 @@ private: ...@@ -59,10 +59,10 @@ private:
/// @see the related in README in effects/update /// @see the related in README in effects/update
bool updateEffectParameters(const QDomNodeList &parameters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion); bool updateEffectParameters(const QDomNodeList &parameters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion);
*/ */
QString factorizeGeomValue(QString value, double factor); QString factorizeGeomValue(const QString &value, double factor);
/** @brief Kdenlive <= 0.9.10 saved title clip item position/opacity with locale which was wrong, fix. */ /** @brief Kdenlive <= 0.9.10 saved title clip item position/opacity with locale which was wrong, fix. */
void fixTitleProducerLocale(QDomElement &producer); void fixTitleProducerLocale(QDomElement &producer);
void convertKeyframeEffect(QDomElement effect, QStringList params, QMap <int, double> &values, int offset); void convertKeyframeEffect(const QDomElement &effect, const QStringList &params, QMap <int, double> &values, int offset);
}; };
#endif #endif
...@@ -1659,7 +1659,7 @@ void KdenliveDoc::checkPreviewStack() ...@@ -1659,7 +1659,7 @@ void KdenliveDoc::checkPreviewStack()
emit removeInvalidUndo(m_commandStack->count()); emit removeInvalidUndo(m_commandStack->count());
} }
void KdenliveDoc::saveMltPlaylist(const QString fileName) void KdenliveDoc::saveMltPlaylist(const QString &fileName)
{ {
m_render->preparePreviewRendering(fileName); m_render->preparePreviewRendering(fileName);
} }
......
...@@ -121,7 +121,7 @@ public: ...@@ -121,7 +121,7 @@ public:
/** @brief Saves the project file xml to a file. */ /** @brief Saves the project file xml to a file. */
bool saveSceneList(const QString &path, const QString &scene); bool saveSceneList(const QString &path, const QString &scene);
/** @brief Saves only the MLT xml to a file for preview rendering. */ /** @brief Saves only the MLT xml to a file for preview rendering. */
void saveMltPlaylist(const QString fileName); void saveMltPlaylist(const QString &fileName);
void cacheImage(const QString &fileId, const QImage &img) const; void cacheImage(const QString &fileId, const QImage &img) const;
void setProjectFolder(QUrl url); void setProjectFolder(QUrl url);
void setZone(int start, int end); void setZone(int start, int end);
......
...@@ -153,7 +153,7 @@ private: ...@@ -153,7 +153,7 @@ private:
class ConfigTracksCommand : public QUndoCommand class ConfigTracksCommand : public QUndoCommand
{ {
public: public:
ConfigTracksCommand(Timeline *timeline, int track, const QString &oldName, const QString &newName, int oldState = -1, int newState = -1, QUndoCommand* parent = 0); ConfigTracksCommand(Timeline *timeline, int track, const QString &oldName, const QString &newName, int oldState = -1, int newState = -1, QUndoCommand* parent = Q_NULLPTR);
void undo(); void undo();
void redo(); void redo();
private: private:
...@@ -387,7 +387,7 @@ private: ...@@ -387,7 +387,7 @@ private:
class RebuildGroupCommand : public QUndoCommand class RebuildGroupCommand : public QUndoCommand
{ {
public: public:
RebuildGroupCommand(CustomTrackView *view, int childTrack, const GenTime &childPos, QUndoCommand* parent = 0); RebuildGroupCommand(CustomTrackView *view, int childTrack, const GenTime &childPos, QUndoCommand* parent = Q_NULLPTR);
void undo(); void undo();
void redo(); void redo();
private: private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment