diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp --- a/src/bin/bin.cpp +++ b/src/bin/bin.cpp @@ -846,11 +846,10 @@ if (!xml.isNull()) { QUrl url = QUrl::fromLocalFile(EffectsList::property(xml, "resource")); if (url.isValid()) { + QUrl directoryURL = url.adjusted(QUrl::RemoveFilename); + QDesktopServices::openUrl(directoryURL); qDebug()<<" / / "+url.toString(); - QString directoryURL = url.toString(); - directoryURL = directoryURL.mid(0,directoryURL.lastIndexOf('/')+1); - qDebug()<<" / / "+directoryURL; - QDesktopServices::openUrl(QUrl(directoryURL)); + qDebug()<<" / / "+directoryURL.toString(); } else { emitMessage(i18n("Couldn't locate ") + QString(" ("+url.toString()+")"), ErrorMessage); return; diff --git a/src/mltconnection.cpp b/src/mltconnection.cpp --- a/src/mltconnection.cpp +++ b/src/mltconnection.cpp @@ -35,13 +35,13 @@ 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 = KdenliveSettings::mltpath(); - if (basePath.isEmpty() || !QFile::exists(basePath)) basePath = QStringLiteral(MLT_DATADIR) + "/profiles/"; // build-time definition + if (basePath.isEmpty() || !QFile::exists(basePath)) basePath = qgetenv("MLT_DATADIR") + "/profiles/"; // build-time definition KdenliveSettings::setMltpath(basePath); QString meltPath = basePath.section('/', 0, -3) + "/bin/melt"; if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_PREFIX") + "/bin/melt"; if (!QFile::exists(meltPath)) meltPath = KdenliveSettings::rendererpath(); - if (!QFile::exists(meltPath)) meltPath = QStringLiteral(MLT_MELTBIN); + if (!QFile::exists(meltPath)) meltPath = qgetenv("MLT_MELTBIN"); if (!QFile::exists(meltPath)) meltPath = QStandardPaths::findExecutable("melt"); KdenliveSettings::setRendererpath(meltPath);