X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fprofilesdialog.cpp;h=1e9c86410c4b0da43bb960d8f36410b7f8f0850d;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=6072f1818229bc9707261fa668311470bd66a8d6;hpb=8ba16be0b04c2826f4a411fcf062401782f89c4e;p=kdenlive diff --git a/src/profilesdialog.cpp b/src/profilesdialog.cpp index 6072f181..1e9c8641 100644 --- a/src/profilesdialog.cpp +++ b/src/profilesdialog.cpp @@ -131,7 +131,7 @@ void ProfilesDialog::fillList(const QString &selectedProfile) } if (!KdenliveSettings::default_profile().isEmpty()) { - for (int i = 0; i < m_view.profiles_list->count(); i++) { + for (int i = 0; i < m_view.profiles_list->count(); ++i) { if (m_view.profiles_list->itemData(i).toString() == KdenliveSettings::default_profile()) { m_view.profiles_list->setCurrentIndex(i); break; @@ -201,7 +201,7 @@ bool ProfilesDialog::slotSaveProfile() QString profilePath = KStandardDirs::locateLocal("appdata", customName + QString::number(i)); kDebug() << " TYING PROFILE FILE: " << profilePath; while (KIO::NetAccess::exists(KUrl(profilePath), KIO::NetAccess::SourceSide, this)) { - i++; + ++i; profilePath = KStandardDirs::locateLocal("appdata", customName + QString::number(i)); } saveProfile(profilePath); @@ -320,7 +320,7 @@ bool ProfilesDialog::existingProfileDescription(const QString &desc) } // static -QString ProfilesDialog::existingProfile(MltVideoProfile profile) +QString ProfilesDialog::existingProfile(const MltVideoProfile &profile) { // Check if the profile has a matching entry in existing ones QStringList profilesFilter; @@ -448,7 +448,7 @@ QMap< QString, QString > ProfilesDialog::getSettingsForProfile(const QString& pr } // static -bool ProfilesDialog::matchProfile(int width, int height, double fps, double par, bool isImage, MltVideoProfile profile) +bool ProfilesDialog::matchProfile(int width, int height, double fps, double par, bool isImage, const MltVideoProfile &profile) { int profileWidth; if (isImage) { @@ -542,7 +542,7 @@ void ProfilesDialog::saveProfile(MltVideoProfile &profile, QString profilePath) profilePath = KStandardDirs::locateLocal("appdata", customName + QString::number(i)); kDebug() << " TYING PROFILE FILE: " << profilePath; while (KIO::NetAccess::exists(KUrl(profilePath), KIO::NetAccess::SourceSide, 0)) { - i++; + ++i; profilePath = KStandardDirs::locateLocal("appdata", customName + QString::number(i)); } } @@ -571,7 +571,8 @@ void ProfilesDialog::slotUpdateDisplay(QString currentProfile) } QLocale locale; m_selectedProfileIndex = m_view.profiles_list->currentIndex(); - if (currentProfile.isEmpty()) currentProfile = m_view.profiles_list->itemData(m_view.profiles_list->currentIndex()).toString(); + if (currentProfile.isEmpty()) + currentProfile = m_view.profiles_list->itemData(m_view.profiles_list->currentIndex()).toString(); m_isCustomProfile = currentProfile.contains('/'); m_view.button_create->setEnabled(true); m_view.button_delete->setEnabled(m_isCustomProfile);