[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdenlive/Applications/15.12] src: Fix setting MLT paths with environment/build variables
From: Vincent Pinon <vpinon () kde ! org>
Date: 2015-12-01 0:04:23
Message-ID: E1a3YQh-0006O2-90 () scm ! kde ! org
[Download RAW message or body]
Git commit 22f0e83387b8ca3f0c2b5d3b6ed1bcab547fe837 by Vincent Pinon.
Committed on 01/12/2015 at 00:03.
Pushed by vpinon into branch 'Applications/15.12'.
Fix setting MLT paths with environment/build variables
BUG: 353260
M +14 -17 src/mltconnection.cpp
http://commits.kde.org/kdenlive/22f0e83387b8ca3f0c2b5d3b6ed1bcab547fe837
diff --git a/src/mltconnection.cpp b/src/mltconnection.cpp
index 721b187..9c4aa5f 100644
--- a/src/mltconnection.cpp
+++ b/src/mltconnection.cpp
@@ -31,28 +31,25 @@ MltConnection::MltConnection(QObject* parent) :
void MltConnection::locateMeltAndProfilesPath(const QString& mltPath)
{
QString basePath = mltPath;
- if (basePath.isEmpty()) {
- basePath = qgetenv("MLT_PREFIX");
- }
- if (basePath.isEmpty()){
- basePath = QString(MLT_PREFIX);
- }
- KdenliveSettings::setMltpath(QString(MLT_DATADIR) + "/profiles/");
- KdenliveSettings::setRendererpath(QString(MLT_MELTBIN));
+ if (basePath.isEmpty() || !QFile::exists(basePath)) basePath = \
KdenliveSettings::mltpath(); + if (basePath.isEmpty() || !QFile::exists(basePath)) \
basePath = qgetenv("MLT_PROFILES_PATH"); + if (basePath.isEmpty() || \
!QFile::exists(basePath)) basePath = qgetenv("MLT_DATA") + "/profiles/"; + if \
(basePath.isEmpty() || !QFile::exists(basePath)) basePath = qgetenv("MLT_PREFIX") + \
"/share/mlt/profiles/"; + if (basePath.isEmpty() || !QFile::exists(basePath)) \
basePath = QString(MLT_DATADIR) + "/profiles/"; // build-time definition + \
KdenliveSettings::setMltpath(basePath);
- if (KdenliveSettings::rendererpath().isEmpty() || \
KdenliveSettings::rendererpath().endsWith(QLatin1String("inigo"))) {
- QString meltPath = QString(MLT_MELTBIN);
- if (!QFile::exists(meltPath)) {
- meltPath = QStandardPaths::findExecutable("melt");
- }
- KdenliveSettings::setRendererpath(meltPath);
- }
+ QString meltPath = KdenliveSettings::rendererpath();
+ if (!QFile::exists(meltPath)) meltPath = basePath.section('/', 0, -3) + \
"/bin/melt"; + if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + \
"/bin/melt"; + if (!QFile::exists(meltPath)) meltPath = QString(MLT_MELTBIN);
+ if (!QFile::exists(meltPath)) meltPath = QStandardPaths::findExecutable("melt");
+ KdenliveSettings::setRendererpath(meltPath);
if (KdenliveSettings::rendererpath().isEmpty()) {
// Cannot find the MLT melt renderer, ask for location
QPointer<KUrlRequesterDialog> getUrl = new KUrlRequesterDialog(QUrl(),
- i18n("Cannot \
find the melt program required for rendering (part of MLT)"),
- \
pCore->window()); + i18n("Cannot find the melt program required for \
rendering (part of MLT)"), + pCore->window());
if (getUrl->exec() == QDialog::Rejected) {
delete getUrl;
::exit(0);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic