Changeset View
Changeset View
Standalone View
Standalone View
src/access.cpp
Show All 20 Lines | |||||
21 | #include "accessdialog.h" | 21 | #include "accessdialog.h" | ||
22 | 22 | | |||
23 | #include <QLoggingCategory> | 23 | #include <QLoggingCategory> | ||
24 | 24 | | |||
25 | #include <KLocalizedString> | 25 | #include <KLocalizedString> | ||
26 | 26 | | |||
27 | Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAccess, "xdg-desktop-portal-kde-access") | 27 | Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAccess, "xdg-desktop-portal-kde-access") | ||
28 | 28 | | |||
29 | Access::Access(QObject *parent) | 29 | AccessPortal::AccessPortal(QObject *parent) | ||
30 | : QObject(parent) | 30 | : QDBusAbstractAdaptor(parent) | ||
31 | { | 31 | { | ||
32 | } | 32 | } | ||
33 | 33 | | |||
34 | Access::~Access() | 34 | AccessPortal::~AccessPortal() | ||
35 | { | 35 | { | ||
36 | } | 36 | } | ||
37 | 37 | | |||
38 | uint Access::accessDialog(const QDBusObjectPath &handle, | 38 | uint AccessPortal::AccessDialog(const QDBusObjectPath &handle, | ||
39 | const QString &app_id, | 39 | const QString &app_id, | ||
40 | const QString &parent_window, | 40 | const QString &parent_window, | ||
41 | const QString &title, | 41 | const QString &title, | ||
42 | const QString &subtitle, | 42 | const QString &subtitle, | ||
43 | const QString &body, | 43 | const QString &body, | ||
44 | const QVariantMap &options, | 44 | const QVariantMap &options, | ||
45 | QVariantMap &results) | 45 | QVariantMap &results) | ||
46 | { | 46 | { | ||
47 | qCDebug(XdgDesktopPortalKdeAccess) << "AccessDialog called with parameters:"; | 47 | qCDebug(XdgDesktopPortalKdeAccess) << "AccessDialog called with parameters:"; | ||
48 | qCDebug(XdgDesktopPortalKdeAccess) << " handle: " << handle.path(); | 48 | qCDebug(XdgDesktopPortalKdeAccess) << " handle: " << handle.path(); | ||
49 | qCDebug(XdgDesktopPortalKdeAccess) << " app_id: " << app_id; | 49 | qCDebug(XdgDesktopPortalKdeAccess) << " app_id: " << app_id; | ||
50 | qCDebug(XdgDesktopPortalKdeAccess) << " parent_window: " << parent_window; | 50 | qCDebug(XdgDesktopPortalKdeAccess) << " parent_window: " << parent_window; | ||
51 | qCDebug(XdgDesktopPortalKdeAccess) << " title: " << title; | 51 | qCDebug(XdgDesktopPortalKdeAccess) << " title: " << title; | ||
52 | qCDebug(XdgDesktopPortalKdeAccess) << " subtitle: " << subtitle; | 52 | qCDebug(XdgDesktopPortalKdeAccess) << " subtitle: " << subtitle; | ||
53 | qCDebug(XdgDesktopPortalKdeAccess) << " body: " << body; | 53 | qCDebug(XdgDesktopPortalKdeAccess) << " body: " << body; | ||
54 | qCDebug(XdgDesktopPortalKdeAccess) << " options: " << options; | 54 | qCDebug(XdgDesktopPortalKdeAccess) << " options: " << options; | ||
55 | 55 | | |||
56 | AccessDialog *accessDialog = new AccessDialog(); | 56 | auto accessDialog = new ::AccessDialog(); | ||
57 | accessDialog->setBody(body); | 57 | accessDialog->setBody(body); | ||
58 | accessDialog->setTitle(title); | 58 | accessDialog->setTitle(title); | ||
59 | accessDialog->setSubtitle(subtitle); | 59 | accessDialog->setSubtitle(subtitle); | ||
60 | 60 | | |||
61 | if (options.contains(QLatin1String("modal"))) { | 61 | if (options.contains(QLatin1String("modal"))) { | ||
62 | accessDialog->setModal(options.value(QLatin1String("modal")).toBool()); | 62 | accessDialog->setModal(options.value(QLatin1String("modal")).toBool()); | ||
63 | } | 63 | } | ||
64 | 64 | | |||
Show All 22 Lines |