Commit f8696c81 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix broken generators (mimetype not added on non KDE Desktop)

BUG: 371798
parent bf0e2085
......@@ -3,7 +3,7 @@
<mime-type type="video/mlt-playlist">
<comment>MLT video playlist</comment>
<sub-class-of type="application/xml"/>
<glob pattern="*.westley"/>
<glob pattern="*.mlt"/>
<glob pattern="*.westley"/>
</mime-type>
</mime-info>
......@@ -161,7 +161,17 @@ QUrl Generators::getSavedClip(QString clipFolder)
if (clipFolder.isEmpty()) {
clipFolder = QDir::homePath();
}
QUrl url = QFileDialog::getSaveFileUrl(this, i18n("Save clip"), QUrl::fromLocalFile(clipFolder), i18n("MLT playlist (*.mlt)"));
QFileDialog fd(this);
fd.setDirectory(clipFolder);
fd.setNameFilter(i18n("MLT playlist (*.mlt)"));
fd.setAcceptMode(QFileDialog::AcceptSave);
fd.setFileMode(QFileDialog::AnyFile);
fd.setDefaultSuffix(QStringLiteral("mlt"));
if (fd.exec() != QDialog::Accepted || fd.selectedUrls().isEmpty()) {
return QUrl();
}
QUrl url = fd.selectedUrls().first();
if (url.isValid()) {
#if KXMLGUI_VERSION_MINOR < 23 && KXMLGUI_VERSION_MAJOR == 5
// Since Plasma 5.7 (release at same time as KF 5.23,
......
......@@ -341,13 +341,10 @@ bool ProjectManager::saveFileAs()
fd.setAcceptMode(QFileDialog::AcceptSave);
fd.setFileMode(QFileDialog::AnyFile);
fd.setDefaultSuffix(QStringLiteral("kdenlive"));
if (fd.exec() != QDialog::Accepted) {
if (fd.exec() != QDialog::Accepted || fd.selectedFiles().isEmpty()) {
return false;
}
if (fd.selectedFiles().isEmpty()) {
return false;
}
QString outputFile = fd.selectedFiles().at(0);
QString outputFile = fd.selectedFiles().first();
#if KXMLGUI_VERSION_MINOR < 23 && KXMLGUI_VERSION_MAJOR == 5
// Since Plasma 5.7 (release at same time as KF 5.23,
......
Supports Markdown
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