#include <KIO/NetAccess>
#include <QDir>
-#include <qscriptengine.h>
+#include <QScriptEngine>
#include <QCloseEvent>
#include <QScriptEngine>
}
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;
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);
}
// 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;
}
// 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) {
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));
}
}
}
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);