Commit a7d62a32 authored by Milian Wolff's avatar Milian Wolff
Browse files

Use KFileWidget::setSupportedSchemes when available

Summary:
This makes QFileDialog::setSupportedSchemes work for the KDE file
dialogs.

Depends on D10024.

Reviewers: dfaure

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10025
parent d4d0bc3b
......@@ -31,15 +31,15 @@
#include <KSharedConfig>
#include <KWindowConfig>
#include <KProtocolInfo>
#include <kio_version.h>
#include <KIO/StatJob>
#include <KJobWidgets>
#include <QMimeDatabase>
#include <QVBoxLayout>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QWindow>
#include <KIO/StatJob>
#include <KJobWidgets>
#include <QTextStream>
namespace
......@@ -325,6 +325,10 @@ void KDEPlatformFileDialogHelper::initializeDialog()
} else if (options()->acceptMode() == QFileDialogOptions::AcceptSave) {
dialog->m_fileWidget->setConfirmOverwrite(true);
}
#if KIO_VERSION >= QT_VERSION_CHECK(5, 43, 0)
dialog->m_fileWidget->setSupportedSchemes(options()->supportedSchemes());
#endif
}
}
......
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