summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Pinon <vpinon@kde.org>2017-11-03 21:20:56 (GMT)
committerVincent Pinon <vpinon@kde.org>2017-11-03 21:20:56 (GMT)
commit164f9fe0a665a85a5c8b41318dfa58290d8e7f6b (patch)
tree428d5f38171d22ce777be4ae27835beaf78ce379
parent0a12e90cb55e27be72109629dd3836873ad4cca2 (diff)
Fix melt.exe finding on windows
-rw-r--r--src/mltconnection.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mltconnection.cpp b/src/mltconnection.cpp
index 625459f..b6f9f1f 100644
--- a/src/mltconnection.cpp
+++ b/src/mltconnection.cpp
@@ -57,9 +57,9 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
KdenliveSettings::setMltpath(profilePath);
#ifdef Q_OS_WIN
- QString meltPath = QDir::cleanPath(profilePath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/melt.exe");
+ QString meltPath = QDir::cleanPath(profilePath + QStringLiteral("../../../melt.exe"));
#else
- QString meltPath = QDir::cleanPath(profilePath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/bin/melt");
+ QString meltPath = QDir::cleanPath(profilePath + QStringLiteral("../../../bin/melt"));
if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + QStringLiteral("/bin/melt");
if (!QFile::exists(meltPath)) meltPath = KdenliveSettings::rendererpath();
if (!QFile::exists(meltPath)) meltPath = QStandardPaths::findExecutable("melt");
@@ -84,7 +84,11 @@ void MltConnection::locateMeltAndProfilesPath(const QString &mltPath)
}
}
if (profilePath.isEmpty()) {
- profilePath = QDir::cleanPath(meltPath).section(QLatin1Char('/'), 0, -3) + QStringLiteral("/share/mlt/profiles/");
+#ifdef Q_OS_WIN
+ profilePath = QDir::cleanPath(meltPath + QStringLiteral("/../share/mlt/profiles/"));
+#else
+ profilePath = QDir::cleanPath(meltPath + QStringLiteral("/../../share/mlt/profiles/"));
+#endif
KdenliveSettings::setMltpath(profilePath);
}
QStringList profilesFilter;