aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Baptiste Mardelle <[email protected]>2017-11-10 14:40:56 +0100
committerJean-Baptiste Mardelle <[email protected]>2017-11-10 14:40:56 +0100
commit102e588cfd0b1f9b080731cee16b33be4489255f (patch)
tree3745583536158ce3cb3bec43cd09de3682a16fef
parent6b63039e5139b60355eeb4faa81ab7d371d07a2d (diff)
Fix extension in transcode file dialog
-rw-r--r--src/project/jobs/cutclipjob.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/project/jobs/cutclipjob.cpp b/src/project/jobs/cutclipjob.cpp
index 3e411f9..1716130 100644
--- a/src/project/jobs/cutclipjob.cpp
+++ b/src/project/jobs/cutclipjob.cpp
@@ -35,6 +35,7 @@
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
+#include <kio_version.h>
CutClipJob::CutClipJob(ClipType cType, const QString &id, const QStringList &parameters) : AbstractClipJob(CUTJOB, cType, id)
{
@@ -395,7 +396,14 @@ QHash<ProjectClip *, AbstractClipJob *> CutClipJob::prepareTranscodeJob(double f
d->setWindowTitle(i18n("Transcoding"));
ui.extra_params->setMaximumHeight(QFontMetrics(qApp->font()).lineSpacing() * 5);
if (clips.count() == 1) {
- ui.file_url->setUrl(QUrl(destinations.constFirst()));
+ ui.file_url->setMode(KFile::File);
+#if KIO_VERSION >= QT_VERSION_CHECK(5,33,0)
+ ui.file_url->setAcceptMode(QFileDialog::AcceptSave);
+#elif !defined(KIOWIDGETS_DEPRECATED)
+ ui.file_url->fileDialog()->setAcceptMode(QFileDialog::AcceptSave);
+#endif
+ ui.file_url->setUrl(QUrl::fromLocalFile(destinations.constFirst()));
+ ui.file_url->setFilter("*." + destinations.constFirst().section(QLatin1Char('.'), -1));
} else {
ui.destination_label->setVisible(false);
ui.file_url->setVisible(false);