Changeset View
Changeset View
Standalone View
Standalone View
src/access.cpp
Show All 13 Lines | |||||
14 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 14 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
15 | * | 15 | * | ||
16 | * Authors: | 16 | * Authors: | ||
17 | * Jan Grulich <jgrulich@redhat.com> | 17 | * Jan Grulich <jgrulich@redhat.com> | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include "access.h" | 20 | #include "access.h" | ||
21 | #include "accessdialog.h" | 21 | #include "accessdialog.h" | ||
22 | #include "utils.h" | ||||
22 | 23 | | |||
23 | #include <QLoggingCategory> | 24 | #include <QLoggingCategory> | ||
24 | 25 | | |||
25 | #include <KLocalizedString> | 26 | #include <KLocalizedString> | ||
26 | 27 | | |||
27 | Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAccess, "xdp-kde-access") | 28 | Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAccess, "xdp-kde-access") | ||
28 | 29 | | |||
29 | AccessPortal::AccessPortal(QObject *parent) | 30 | AccessPortal::AccessPortal(QObject *parent) | ||
Show All 19 Lines | 47 | { | |||
49 | qCDebug(XdgDesktopPortalKdeAccess) << " app_id: " << app_id; | 50 | qCDebug(XdgDesktopPortalKdeAccess) << " app_id: " << app_id; | ||
50 | qCDebug(XdgDesktopPortalKdeAccess) << " parent_window: " << parent_window; | 51 | qCDebug(XdgDesktopPortalKdeAccess) << " parent_window: " << parent_window; | ||
51 | qCDebug(XdgDesktopPortalKdeAccess) << " title: " << title; | 52 | qCDebug(XdgDesktopPortalKdeAccess) << " title: " << title; | ||
52 | qCDebug(XdgDesktopPortalKdeAccess) << " subtitle: " << subtitle; | 53 | qCDebug(XdgDesktopPortalKdeAccess) << " subtitle: " << subtitle; | ||
53 | qCDebug(XdgDesktopPortalKdeAccess) << " body: " << body; | 54 | qCDebug(XdgDesktopPortalKdeAccess) << " body: " << body; | ||
54 | qCDebug(XdgDesktopPortalKdeAccess) << " options: " << options; | 55 | qCDebug(XdgDesktopPortalKdeAccess) << " options: " << options; | ||
55 | 56 | | |||
56 | auto accessDialog = new ::AccessDialog(); | 57 | auto accessDialog = new ::AccessDialog(); | ||
58 | Utils::setParentWindow(accessDialog, parent_window); | ||||
57 | accessDialog->setBody(body); | 59 | accessDialog->setBody(body); | ||
58 | accessDialog->setTitle(title); | 60 | accessDialog->setTitle(title); | ||
59 | accessDialog->setSubtitle(subtitle); | 61 | accessDialog->setSubtitle(subtitle); | ||
60 | 62 | | |||
61 | if (options.contains(QLatin1String("modal"))) { | 63 | if (options.contains(QLatin1String("modal"))) { | ||
62 | accessDialog->setModal(options.value(QLatin1String("modal")).toBool()); | 64 | accessDialog->setModal(options.value(QLatin1String("modal")).toBool()); | ||
63 | } | 65 | } | ||
64 | 66 | | |||
Show All 22 Lines |