Commit ed9df7a8 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

KDE 5: Do not use native KDE file dialogs in script unless configured.

parent 4119cb8c
......@@ -36,6 +36,7 @@
#include <QCryptographicHash>
#include "pictureframe.h"
#include "saferename.h"
#include "mainwindowconfig.h"
#if QT_VERSION < 0x050000
......@@ -500,6 +501,11 @@ QVariant ScriptUtils::scaleImage(const QVariant& var, int width, int height)
QString ScriptUtils::selectFileName(const QString& caption, const QString& dir,
const QString& filter, bool saveFile)
return saveFile ? QFileDialog::getSaveFileName(0, caption, dir, filter)
: QFileDialog::getOpenFileName(0, caption, dir, filter);
QFileDialog::Options options =
? QFileDialog::DontUseNativeDialog : QFileDialog::Options(0);
return saveFile ? QFileDialog::getSaveFileName(0, caption, dir, filter,
0, options)
: QFileDialog::getOpenFileName(0, caption, dir, filter,
0, options);
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