Verified Commit 79184c06 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Run clang-format

If you want git blame to ignore formatting revisions run:
git config blame.ignoreRevsFile .git-blame-ignore-revs
parent ad6fe502
......@@ -23,7 +23,6 @@
#include <QLoggingCategory>
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAccess, "xdp-kde-access")
AccessPortal::AccessPortal(QObject *parent)
......@@ -36,13 +35,13 @@ AccessPortal::~AccessPortal()
}
uint AccessPortal::AccessDialog(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
const QString &subtitle,
const QString &body,
const QVariantMap &options,
QVariantMap &results)
const QString &app_id,
const QString &parent_window,
const QString &title,
const QString &subtitle,
const QString &body,
const QVariantMap &options,
QVariantMap &results)
{
qCDebug(XdgDesktopPortalKdeAccess) << "AccessDialog called with parameters:";
qCDebug(XdgDesktopPortalKdeAccess) << " handle: " << handle.path();
......
......@@ -44,4 +44,3 @@ public Q_SLOTS:
};
#endif // XDG_DESKTOP_PORTAL_KDE_ACCESS_H
......@@ -22,8 +22,8 @@
#include "ui_accessdialog.h"
#include <QLoggingCategory>
#include <QStandardPaths>
#include <QPushButton>
#include <QStandardPaths>
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAccessDialog, "xdp-kde-access-dialog")
......@@ -75,5 +75,3 @@ void AccessDialog::setTitle(const QString &title)
{
m_dialog->titleLabel->setText(title);
}
......@@ -43,10 +43,7 @@ public:
void setSubtitle(const QString &subtitle);
private:
Ui::AccessDialog * m_dialog;
Ui::AccessDialog *m_dialog;
};
#endif // XDG_DESKTOP_PORTAL_KDE_ACCESS_DIALOG_H
......@@ -33,7 +33,7 @@ public:
~AccountPortal();
public Q_SLOTS:
uint GetUserInformation(const QDBusObjectPath &handle,
uint GetUserInformation(const QDBusObjectPath &handle, //
const QString &app_id,
const QString &parent_window,
const QVariantMap &options,
......@@ -41,5 +41,3 @@ public Q_SLOTS:
};
#endif // XDG_DESKTOP_PORTAL_KDE_ACCOUNT_H
......@@ -23,7 +23,6 @@
#include <QLoggingCategory>
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAppChooser, "xdp-kde-app-chooser")
AppChooserPortal::AppChooserPortal(QObject *parent)
......
......@@ -41,12 +41,10 @@ public Q_SLOTS:
const QStringList &choices,
const QVariantMap &options,
QVariantMap &results);
void UpdateChoices(const QDBusObjectPath &handle,
const QStringList &choices);
void UpdateChoices(const QDBusObjectPath &handle, const QStringList &choices);
private:
QMap<QString, AppChooserDialog*> m_appChooserDialogs;
QMap<QString, AppChooserDialog *> m_appChooserDialogs;
};
#endif // XDG_DESKTOP_PORTAL_KDE_APPCHOOSER_H
......@@ -24,19 +24,24 @@
#include <QQmlContext>
#include <QQmlEngine>
#include <QQuickWidget>
#include <QQuickItem>
#include <QQuickWidget>
#include <QDir>
#include <QStandardPaths>
#include <QSettings>
#include <QStandardPaths>
#include <KApplicationTrader>
#include <KProcess>
#include <KService>
#include <kdeclarative/kdeclarative.h>
AppChooserDialog::AppChooserDialog(const QStringList &choices, const QString &defaultApp, const QString &fileName, const QString &mimeName, QDialog *parent, Qt::WindowFlags flags)
AppChooserDialog::AppChooserDialog(const QStringList &choices,
const QString &defaultApp,
const QString &fileName,
const QString &mimeName,
QDialog *parent,
Qt::WindowFlags flags)
: QDialog(parent, flags)
, m_dialog(new Ui::AppChooserDialog)
, m_defaultChoices(choices)
......@@ -65,7 +70,8 @@ AppChooserDialog::AppChooserDialog(const QStringList &choices, const QString &de
qmlRegisterSingletonInstance<AppChooserData>("org.kde.xdgdesktopportal", 1, 0, "AppChooserData", data);
m_dialog->quickWidget->setClearColor(Qt::transparent);
m_dialog->quickWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
m_dialog->quickWidget->setSource(QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("xdg-desktop-portal-kde/qml/AppChooserDialog.qml"))));
m_dialog->quickWidget->setSource(
QUrl::fromLocalFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("xdg-desktop-portal-kde/qml/AppChooserDialog.qml"))));
connect(data, &AppChooserData::openDiscover, this, &AppChooserDialog::onOpenDiscover);
connect(data, &AppChooserData::applicationSelected, this, &AppChooserDialog::onApplicationSelected);
......@@ -83,7 +89,7 @@ QString AppChooserDialog::selectedApplication() const
return m_selectedApplication;
}
void AppChooserDialog::onApplicationSelected(const QString& desktopFile)
void AppChooserDialog::onApplicationSelected(const QString &desktopFile)
{
m_selectedApplication = desktopFile;
QDialog::accept();
......@@ -181,7 +187,8 @@ bool AppFilterModel::filterAcceptsRow(int source_row, const QModelIndex &source_
{
const QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
ApplicationItem::ApplicationCategory category = static_cast<ApplicationItem::ApplicationCategory>(sourceModel()->data(index, AppModel::ApplicationCategoryRole).toInt());
ApplicationItem::ApplicationCategory category =
static_cast<ApplicationItem::ApplicationCategory>(sourceModel()->data(index, AppModel::ApplicationCategoryRole).toInt());
QString appName = sourceModel()->data(index, AppModel::ApplicationNameRole).toString();
if (m_showOnlyPreferredApps)
......@@ -198,8 +205,10 @@ bool AppFilterModel::filterAcceptsRow(int source_row, const QModelIndex &source_
bool AppFilterModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
{
ApplicationItem::ApplicationCategory leftCategory = static_cast<ApplicationItem::ApplicationCategory>(sourceModel()->data(left, AppModel::ApplicationCategoryRole).toInt());
ApplicationItem::ApplicationCategory rightCategory = static_cast<ApplicationItem::ApplicationCategory>(sourceModel()->data(right, AppModel::ApplicationCategoryRole).toInt());
ApplicationItem::ApplicationCategory leftCategory =
static_cast<ApplicationItem::ApplicationCategory>(sourceModel()->data(left, AppModel::ApplicationCategoryRole).toInt());
ApplicationItem::ApplicationCategory rightCategory =
static_cast<ApplicationItem::ApplicationCategory>(sourceModel()->data(right, AppModel::ApplicationCategoryRole).toInt());
QString leftName = sourceModel()->data(left, AppModel::ApplicationNameRole).toString();
QString rightName = sourceModel()->data(right, AppModel::ApplicationNameRole).toString();
......@@ -283,16 +292,16 @@ QVariant AppModel::data(const QModelIndex &index, int role) const
ApplicationItem item = m_list.at(row);
switch (role) {
case ApplicationNameRole:
return item.applicationName();
case ApplicationIconRole:
return item.applicationIcon();
case ApplicationDesktopFileRole:
return item.applicationDesktopFile();
case ApplicationCategoryRole:
return static_cast<int>(item.applicationCategory());
default:
break;
case ApplicationNameRole:
return item.applicationName();
case ApplicationIconRole:
return item.applicationIcon();
case ApplicationDesktopFileRole:
return item.applicationDesktopFile();
case ApplicationCategoryRole:
return static_cast<int>(item.applicationCategory());
default:
break;
}
}
......@@ -310,14 +319,14 @@ QHash<int, QByteArray> AppModel::roleNames() const
{ApplicationNameRole, QByteArrayLiteral("applicationName")},
{ApplicationIconRole, QByteArrayLiteral("applicationIcon")},
{ApplicationDesktopFileRole, QByteArrayLiteral("applicationDesktopFile")},
{ApplicationCategoryRole, QByteArrayLiteral("applicationCategory")}
{ApplicationCategoryRole, QByteArrayLiteral("applicationCategory")},
};
}
void AppModel::loadApplications()
{
const KService::List appServices = KApplicationTrader::query([](const KService::Ptr &service) -> bool {
return service->isValid() && !service->noDisplay() /* includes platform and desktop considerations */;
return service->isValid() && !service->noDisplay() /* includes platform and desktop considerations */;
});
for (const KService::Ptr &service : appServices) {
const QString fullName = service->property(QStringLiteral("X-GNOME-FullName"), QVariant::String).toString();
......
......@@ -49,6 +49,7 @@ public:
ApplicationCategory applicationCategory() const;
bool operator==(const ApplicationItem &item) const;
private:
QString m_applicationName;
QString m_applicationIcon;
......@@ -85,7 +86,8 @@ private:
QString m_filter;
};
class AppChooserData : public QObject {
class AppChooserData : public QObject
{
Q_OBJECT
Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged)
Q_PROPERTY(QString defaultApp READ defaultApp WRITE setDefaultApp NOTIFY defaultAppChanged)
......@@ -139,8 +141,12 @@ class AppChooserDialog : public QDialog
{
Q_OBJECT
public:
explicit AppChooserDialog(const QStringList &choices, const QString &defaultApp, const QString &fileName,
const QString &mimeName = QString(), QDialog *parent = nullptr, Qt::WindowFlags flags = {});
explicit AppChooserDialog(const QStringList &choices,
const QString &defaultApp,
const QString &fileName,
const QString &mimeName = QString(),
QDialog *parent = nullptr,
Qt::WindowFlags flags = {});
~AppChooserDialog();
void updateChoices(const QStringList &choices);
......
......@@ -21,18 +21,18 @@
#include "utils.h"
#include "waylandintegration.h"
#include <QDBusMetaType>
#include <QDBusConnection>
#include <QDBusContext>
#include <QDBusMessage>
#include <QDBusConnection>
#include <QDBusMetaType>
#include <QDir>
#include <QFile>
#include <QLoggingCategory>
#include <QMessageBox>
#include <QPushButton>
#include <QStandardPaths>
#include <QSettings>
#include <QStandardPaths>
#include <KConfigGroup>
#include <KDesktopFile>
......@@ -47,10 +47,13 @@ Q_LOGGING_CATEGORY(XdgDesktopPortalKdeBackground, "xdp-kde-background")
BackgroundPortal::BackgroundPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
connect(WaylandIntegration::waylandIntegration(), &WaylandIntegration::WaylandIntegration::plasmaWindowManagementInitialized, this, [=] () {
connect(WaylandIntegration::plasmaWindowManagement(), &KWayland::Client::PlasmaWindowManagement::windowCreated, this, [this] (KWayland::Client::PlasmaWindow *window) {
addWindow(window);
});
connect(WaylandIntegration::waylandIntegration(), &WaylandIntegration::WaylandIntegration::plasmaWindowManagementInitialized, this, [=]() {
connect(WaylandIntegration::plasmaWindowManagement(),
&KWayland::Client::PlasmaWindowManagement::windowCreated,
this,
[this](KWayland::Client::PlasmaWindow *window) {
addWindow(window);
});
m_windows = WaylandIntegration::plasmaWindowManagement()->windows();
for (KWayland::Client::PlasmaWindow *window : qAsConst(m_windows)) {
......@@ -69,10 +72,7 @@ QVariantMap BackgroundPortal::GetAppState()
return m_appStates;
}
uint BackgroundPortal::NotifyBackground(const QDBusObjectPath &handle,
const QString &app_id,
const QString &name,
QVariantMap &results)
uint BackgroundPortal::NotifyBackground(const QDBusObjectPath &handle, const QString &app_id, const QString &name, QVariantMap &results)
{
Q_UNUSED(results);
......@@ -114,15 +114,16 @@ uint BackgroundPortal::NotifyBackground(const QDBusObjectPath &handle,
message.setDelayedReply(true);
connect(notify, QOverload<uint>::of(&KNotification::activated), this, [=] (uint action) {
connect(notify, QOverload<uint>::of(&KNotification::activated), this, [=](uint action) {
if (action != 1) {
return;
}
notify->setProperty("activated", true);
const QString title = i18n("%1 is running in the background", app_id);
const QString text = i18n("This might be for a legitimate reason, but the application has not provided one."
"\n\nNote that forcing an application to quit might cause data loss.");
const QString text = i18n(
"This might be for a legitimate reason, but the application has not provided one."
"\n\nNote that forcing an application to quit might cause data loss.");
QMessageBox messageBox(QMessageBox::Question, title, text);
QPushButton *quitButton = messageBox.addButton(i18n("Force quit"), QMessageBox::RejectRole);
QPushButton *allowButton = messageBox.addButton(i18n("Allow"), QMessageBox::AcceptRole);
......@@ -135,13 +136,13 @@ uint BackgroundPortal::NotifyBackground(const QDBusObjectPath &handle,
result = BackgroundPortal::Allow;
}
const QVariantMap map = { {QStringLiteral("result"), static_cast<uint>(result)} };
const QVariantMap map = {{QStringLiteral("result"), static_cast<uint>(result)}};
QDBusMessage reply = message.createReply({static_cast<uint>(0), map});
if (!QDBusConnection::sessionBus().send(reply)) {
qCWarning(XdgDesktopPortalKdeBackground) << "Failed to send response";
}
});
connect(notify, &KNotification::closed, this, [=] () {
connect(notify, &KNotification::closed, this, [=]() {
if (notify->property("activated").toBool()) {
return;
}
......@@ -159,10 +160,7 @@ uint BackgroundPortal::NotifyBackground(const QDBusObjectPath &handle,
return 0;
}
bool BackgroundPortal::EnableAutostart(const QString &app_id,
bool enable,
const QStringList &commandline,
uint flags)
bool BackgroundPortal::EnableAutostart(const QString &app_id, bool enable, const QStringList &commandline, uint flags)
{
qCDebug(XdgDesktopPortalKdeBackground) << "EnableAutostart called with parameters:";
qCDebug(XdgDesktopPortalKdeBackground) << " app_id: " << app_id;
......@@ -195,7 +193,7 @@ bool BackgroundPortal::EnableAutostart(const QString &app_id,
desktopEntryConfigGroup.writeEntry(QStringLiteral("Name"), app_id);
desktopEntryConfigGroup.writeEntry(QStringLiteral("Exec"), KShell::joinArgs(commandline));
if (autostartFlags.testFlag(AutostartFlag::Activatable)) {
desktopEntryConfigGroup.writeEntry(QStringLiteral("DBusActivatable"), true);
desktopEntryConfigGroup.writeEntry(QStringLiteral("DBusActivatable"), true);
}
desktopEntryConfigGroup.writeEntry(QStringLiteral("X-Flatpak"), app_id);
......@@ -208,10 +206,10 @@ void BackgroundPortal::addWindow(KWayland::Client::PlasmaWindow *window)
const bool isActive = window->isActive();
m_appStates[appId] = QVariant::fromValue<uint>(isActive ? Active : Running);
connect(window, &KWayland::Client::PlasmaWindow::activeChanged, this, [this, window] () {
connect(window, &KWayland::Client::PlasmaWindow::activeChanged, this, [this, window]() {
setActiveWindow(window->appId(), window->isActive());
});
connect(window, &KWayland::Client::PlasmaWindow::unmapped, this, [this, window] () {
connect(window, &KWayland::Client::PlasmaWindow::unmapped, this, [this, window]() {
uint windows = 0;
const QString appId = window->appId();
const auto plasmaWindows = WaylandIntegration::plasmaWindowManagement()->windows();
......
......@@ -24,10 +24,12 @@
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
namespace KWayland {
namespace Client {
class PlasmaWindow;
}
namespace KWayland
{
namespace Client
{
class PlasmaWindow;
}
}
class BackgroundPortal : public QDBusAbstractAdaptor
......@@ -59,15 +61,9 @@ public:
public Q_SLOTS:
QVariantMap GetAppState();
uint NotifyBackground(const QDBusObjectPath &handle,
const QString &app_id,
const QString &name,
QVariantMap &results);
uint NotifyBackground(const QDBusObjectPath &handle, const QString &app_id, const QString &name, QVariantMap &results);
bool EnableAutostart(const QString &app_id,
bool enable,
const QStringList &commandline,
uint flags);
bool EnableAutostart(const QString &app_id, bool enable, const QStringList &commandline, uint flags);
Q_SIGNALS:
void RunningApplicationsChanged();
......@@ -76,11 +72,9 @@ private:
void setActiveWindow(const QString &appId, bool active);
uint m_notificationCounter = 0;
QList<KWayland::Client::PlasmaWindow*> m_windows;
QList<KWayland::Client::PlasmaWindow *> m_windows;
QVariantMap m_appStates;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(BackgroundPortal::AutostartFlags)
#endif // XDG_DESKTOP_PORTAL_KDE_BACKGROUND_H
......@@ -21,8 +21,8 @@
#ifndef XDG_DESKTOP_PORTAL_KDE_DESKTOP_PORTAL_H
#define XDG_DESKTOP_PORTAL_KDE_DESKTOP_PORTAL_H
#include <QObject>
#include <QDBusContext>
#include <QObject>
#include "access.h"
#include "account.h"
......@@ -37,8 +37,8 @@
#include "settings.h"
#include "waylandintegration.h"
#include "screencast.h"
#include "remotedesktop.h"
#include "screencast.h"
class DesktopPortal : public QObject, public QDBusContext
{
......
......@@ -51,10 +51,10 @@ uint EmailPortal::ComposeEmail(const QDBusObjectPath &handle, const QString &app
attachmentString += QStringLiteral("&attachment=%1").arg(attachment);
}
const QString mailtoUrl = QStringLiteral("mailto:%1?subject=%2&body=%3%4").arg(options.value(QStringLiteral("address")).toString(),
options.value(QStringLiteral("subject")).toString(),
options.value(QStringLiteral("body")).toString(),
attachmentString);
const QString mailtoUrl = QStringLiteral("mailto:%1?subject=%2&body=%3%4")
.arg(options.value(QStringLiteral("address")).toString(),
options.value(QStringLiteral("subject")).toString(),
options.value(QStringLiteral("body")).toString(),
attachmentString);
return QDesktopServices::openUrl(QUrl(mailtoUrl));
}
......@@ -33,12 +33,7 @@ public:
~EmailPortal();
public Q_SLOTS:
uint ComposeEmail(const QDBusObjectPath &handle,
const QString &app_id,
const QString &window,
const QVariantMap &options,
QVariantMap &results);
uint ComposeEmail(const QDBusObjectPath &handle, const QString &app_id, const QString &window, const QVariantMap &options, QVariantMap &results);
};
#endif // XDG_DESKTOP_PORTAL_KDE_EMAIL_H
......@@ -21,22 +21,22 @@
#include "filechooser.h"
#include "utils.h"
#include <QDialogButtonBox>
#include <QDBusMetaType>
#include <QDBusArgument>
#include <QLabel>
#include <QLoggingCategory>
#include <QDBusMetaType>
#include <QDialogButtonBox>
#include <QFile>
#include <QGridLayout>
#include <QLabel>
#include <QLoggingCategory>
#include <QPushButton>
#include <QVBoxLayout>
#include <QUrl>
#include <QQmlApplicationEngine>
#include <QStandardPaths>
#include <QUrl>
#include <QVBoxLayout>
#include <KLocalizedString>
#include <KFileFilterCombo>
#include <KFileWidget>
#include <KLocalizedString>
#include <mobilefiledialog.h>
......@@ -53,7 +53,7 @@ Q_DECLARE_METATYPE(FileChooserPortal::Choices)
Q_DECLARE_METATYPE(FileChooserPortal::Option)
Q_DECLARE_METATYPE(FileChooserPortal::OptionList)
QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::Filter &filter)
QDBusArgument &operator<<(QDBusArgument &arg, const FileChooserPortal::Filter &filter)
{
arg.beginStructure();
arg << filter.type << filter.filterString;
......@@ -61,7 +61,7 @@ QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::Filter
return arg;
}
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::Filter &filter)
const QDBusArgument &operator>>(const QDBusArgument &arg, FileChooserPortal::Filter &filter)
{
uint type;
QString filterString;
......@@ -74,7 +74,7 @@ const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::F
return arg;
}
QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::FilterList &filterList)
QDBusArgument &operator<<(QDBusArgument &arg, const FileChooserPortal::FilterList &filterList)
{
arg.beginStructure();
arg << filterList.userVisibleName << filterList.filters;
......@@ -82,7 +82,7 @@ QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::FilterL
return arg;
}
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::FilterList &filterList)
const QDBusArgument &operator>>(const QDBusArgument &arg, FileChooserPortal::FilterList &filterList)
{
QString userVisibleName;
FileChooserPortal::Filters filters;
......@@ -95,7 +95,7 @@ const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::F
return arg;
}
QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::Choice &choice)
QDBusArgument &operator<<(QDBusArgument &arg, const FileChooserPortal::Choice &choice)
{
arg.beginStructure();
arg << choice.id << choice.value;
......@@ -103,7 +103,7 @@ QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::Choice
return arg;
}
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::Choice &choice)
const QDBusArgument &operator>>(const QDBusArgument &arg, FileChooserPortal::Choice &choice)
{
QString id;
QString value;
......@@ -115,7 +115,7 @@ const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::C
return arg;
}
QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::Option &option)
QDBusArgument &operator<<(QDBusArgument &arg, const FileChooserPortal::Option &option)
{
arg.beginStructure();
arg << option.id << option.label << option.choices << option.initialChoiceId;
......@@ -123,7 +123,7 @@ QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::Option
return arg;
}
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::Option &option)
const QDBusArgument &operator>>(const QDBusArgument &arg, FileChooserPortal::Option &option)
{
QString id;
QString label;
......@@ -180,11 +180,11 @@ FileChooserPortal::~FileChooserPortal()
}
uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
const QVariantMap &options,
QVariantMap &results)
const QString &app_id,
const QString &parent_window,
const QString &title,
const QVariantMap &options,
QVariantMap &results)
{
Q_UNUSED(app_id);
......@@ -258,8 +258,8 @@ uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
// for handling of options - choices
QScopedPointer<QWidget> optionsWidget;
// to store IDs for choices along with corresponding comboboxes/checkboxes
QMap<QString, QCheckBox*> checkboxes;
QMap<QString, QComboBox*> comboboxes;
QMap<QString, QCheckBox *> checkboxes;
QMap<QString, QComboBox *> comboboxes;
if (options.contains(QStringLiteral("choices"))) {
OptionList optionList = qdbus_cast<OptionList>(options.value(QStringLiteral("choices")));
......@@ -274,7 +274,6 @@ uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
fileDialog->m_fileWidget->setMode(mode | KFile::Mode::ExistingOnly);
fileDialog->m_fileWidget->okButton()->setText(!acceptLabel.isEmpty() ? acceptLabel : i18n("Open"));
bool bMimeFilters = false;
if (!mimeTypeFilters.isEmpty()) {
fileDialog->m_fileWidget->setMimeFilter(mimeTypeFilters, selectedMimeTypeFilter);
......@@ -326,11 +325,11 @@ uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
}
uint FileChooserPortal::SaveFile(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
const QVariantMap &options,
QVariantMap &results)
const QString &app_id,
const QString &parent_window,
const QString &title,
const QVariantMap &options,
QVariantMap &results)
{
Q_UNUSED(app_id);