Commit f87ee28c authored by Vincent Pinon's avatar Vincent Pinon

Merge branch 'Applications/17.08' into Applications/17.12

parents b5bac8ab d8e27773
......@@ -90,8 +90,8 @@ else()
endif()
find_package(KF5 REQUIRED COMPONENTS Archive Bookmarks CoreAddons Config ConfigWidgets
DBusAddons KIO WidgetsAddons NotifyConfig NewStuff XmlGui Notifications GuiAddons TextWidgets IconThemes Crash
OPTIONAL_COMPONENTS DocTools FileMetaData)
DBusAddons KIO WidgetsAddons NotifyConfig NewStuff XmlGui Notifications GuiAddons TextWidgets IconThemes
OPTIONAL_COMPONENTS DocTools FileMetaData Crash)
if (KF5FileMetaData_FOUND)
message(STATUS "Found KF5 FileMetadata to extract file metadata")
......
......@@ -277,7 +277,6 @@ target_link_libraries(kdenlive
KF5::Notifications
KF5::TextWidgets
KF5::IconThemes
KF5::Crash
Qt5::Svg
${OPENGL_LIBRARIES}
${OPENGLES_LIBRARIES}
......@@ -295,6 +294,11 @@ if (KF5_FILEMETADATA)
target_link_libraries(kdenlive KF5::FileMetaData)
endif()
if (KF5Crash_FOUND)
add_definitions(-DKF5_USE_CRASH)
target_link_libraries(kdenlive KF5::Crash)
endif()
qt5_use_modules( kdenlive Script Widgets Concurrent Qml Quick)
if (Qt5WebKitWidgets_FOUND)
......
......@@ -26,7 +26,9 @@
#include "kxmlgui_version.h"
#include <KAboutData>
#ifdef KF5_USE_CRASH
#include <KCrash>
#endif
#include <KIconLoader>
#include <KSharedConfig>
#include <KConfigGroup>
......@@ -143,7 +145,9 @@ int main(int argc, char *argv[])
parser.process(app);
aboutData.processCommandLine(&parser);
#ifdef KF5_USE_CRASH
KCrash::initialize();
#endif
QString clipsToLoad = parser.value(QStringLiteral("i"));
QString mltPath = parser.value(QStringLiteral("mlt-path"));
......
......@@ -2146,9 +2146,6 @@ void MainWindow::closeEvent(QCloseEvent *event)
{
KXmlGuiWindow::closeEvent(event);
if (event->isAccepted()) {
#ifdef Q_OS_WIN
QProcess::startDetached(QStandardPaths::findExecutable(QStringLiteral("kdeinit5")) + " --terminate");
#endif
QApplication::exit(m_exitCode);
return;
}
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment