]> git.sesse.net Git - kdenlive/commitdiff
Const'reference
authorMontel Laurent <montel@kde.org>
Sun, 12 May 2013 15:25:59 +0000 (17:25 +0200)
committerMontel Laurent <montel@kde.org>
Sun, 12 May 2013 15:25:59 +0000 (17:25 +0200)
src/profilesdialog.cpp
src/profilesdialog.h

index e7469c8e49e0fc13a30a6b31ae521fba72444817..6072f1818229bc9707261fa668311470bd66a8d6 100644 (file)
@@ -119,7 +119,7 @@ void ProfilesDialog::slotProfileEdited()
     m_profileIsModified = true;
 }
 
-void ProfilesDialog::fillList(const QString selectedProfile)
+void ProfilesDialog::fillList(const QString &selectedProfile)
 {
     // List the Mlt profiles
     m_view.profiles_list->clear();
@@ -212,7 +212,7 @@ bool ProfilesDialog::slotSaveProfile()
     return true;
 }
 
-void ProfilesDialog::saveProfile(const QString path)
+void ProfilesDialog::saveProfile(QString path)
 {
     QFile file(path);
     if (!file.open(QIODevice::WriteOnly)) {
@@ -237,7 +237,7 @@ void ProfilesDialog::slotDeleteProfile()
 }
 
 // static
-MltVideoProfile ProfilesDialog::getVideoProfile(QString name)
+MltVideoProfile ProfilesDialog::getVideoProfile(const QString &name)
 {
     MltVideoProfile result;
     QStringList profilesNames;
@@ -283,7 +283,7 @@ MltVideoProfile ProfilesDialog::getVideoProfile(QString name)
 }
 
 // static
-double ProfilesDialog::getStringEval(const MltVideoProfile &profile, QString eval, QPoint frameSize)
+double ProfilesDialog::getStringEval(const MltVideoProfile &profile, QString eval, const QPoint& frameSize)
 {
     QScriptEngine sEngine;
     sEngine.globalObject().setProperty("maxWidth", profile.width > frameSize.x() ? profile.width : frameSize.x());
@@ -394,7 +394,7 @@ QMap <QString, QString> ProfilesDialog::getProfilesInfo()
 }
 
 // static
-QMap< QString, QString > ProfilesDialog::getSettingsFromFile(const QString path)
+QMap< QString, QString > ProfilesDialog::getSettingsFromFile(const QString& path)
 {
     QStringList profilesNames;
     QStringList profilesFiles;
@@ -413,7 +413,7 @@ QMap< QString, QString > ProfilesDialog::getSettingsFromFile(const QString path)
 }
 
 // static
-QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString profileName)
+QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString& profileName)
 {
     QStringList profilesNames;
     QStringList profilesFiles;
@@ -505,7 +505,7 @@ QMap <QString, QString> ProfilesDialog::getProfilesFromProperties(int width, int
 }
 
 // static
-QString ProfilesDialog::getPathFromDescription(const QString profileDesc)
+QString ProfilesDialog::getPathFromDescription(const QString& profileDesc)
 {
     QStringList profilesNames;
     QStringList profilesFiles;
index 18e26fe1c7906dbfc0c3e857325adb2d1f86dfb5..c3710205857cd137e6d1a31e7a81f40262cba8b2 100644 (file)
@@ -34,11 +34,11 @@ public:
     /** @brief Using this constructor, the dialog only allows editing one profile. */
     explicit ProfilesDialog(QString profilePath, QWidget * parent = 0);
 
-    void fillList(const QString selectedProfile = QString());
-    static QMap< QString, QString > getSettingsForProfile(const QString profileName);
-    static QMap< QString, QString > getSettingsFromFile(const QString path);
-    static QString getPathFromDescription(const QString profileDesc);
-    static MltVideoProfile getVideoProfile(QString name);
+    void fillList(const QString &selectedProfile = QString());
+    static QMap< QString, QString > getSettingsForProfile(const QString &profileName);
+    static QMap< QString, QString > getSettingsFromFile(const QString& path);
+    static QString getPathFromDescription(const QString& profileDesc);
+    static MltVideoProfile getVideoProfile(const QString &name);
     static QMap <QString, QString> getProfilesInfo();
     static void saveProfile(MltVideoProfile &profile, QString profilePath = QString());
     static QString existingProfile(MltVideoProfile profile);
@@ -67,7 +67,7 @@ public:
      *  @param profile The profile that gives width & height
      *  @param eval The string to be evaluated, for example: "%width / 2"
      *  @return the evaluated value */
-    static double getStringEval(const MltVideoProfile &profile, QString eval, QPoint frameSize = QPoint());
+    static double getStringEval(const MltVideoProfile &profile, QString eval, const QPoint &frameSize = QPoint());
 
     /** @brief Get the descriptive text for given colorspace code (defined by MLT)
      *  @param colorspace An int as defined in mlt_profile.h
@@ -98,7 +98,7 @@ private:
     bool m_isCustomProfile;
     /** @brief If we are in single profile editing, should contain the path for this profile. */
     QString m_customProfilePath;
-    void saveProfile(const QString path);
+    void saveProfile(QString path);
     bool askForSave();
 };