Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 45843db8 authored by David Edmundson's avatar David Edmundson

Massively simplify the class DesktopPortal

Summary:
Only one QObject can be registered on a DBus path...but that object can
have
multiple adaptors, which is how it's structured anyway.

It's considerably easier than doing everything manually through a
QDBusVirtualObject

Test Plan:
Checked all ifaces registered in qdbusviewer
Manually ran AddNotification, debug appeared in xdg-desktop-portal and a
notification appeared

Reviewers: #plasma, jgrulich

Reviewed By: jgrulich

Subscribers: apol, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6145
parent 2002600f
......@@ -26,16 +26,16 @@
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAccess, "xdg-desktop-portal-kde-access")
Access::Access(QObject *parent)
: QObject(parent)
AccessPortal::AccessPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
}
Access::~Access()
AccessPortal::~AccessPortal()
{
}
uint Access::accessDialog(const QDBusObjectPath &handle,
uint AccessPortal::AccessDialog(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......@@ -53,7 +53,7 @@ uint Access::accessDialog(const QDBusObjectPath &handle,
qCDebug(XdgDesktopPortalKdeAccess) << " body: " << body;
qCDebug(XdgDesktopPortalKdeAccess) << " options: " << options;
AccessDialog *accessDialog = new AccessDialog();
auto accessDialog = new ::AccessDialog();
accessDialog->setBody(body);
accessDialog->setTitle(title);
accessDialog->setSubtitle(subtitle);
......
......@@ -21,19 +21,19 @@
#ifndef XDG_DESKTOP_PORTAL_KDE_ACCESS_H
#define XDG_DESKTOP_PORTAL_KDE_ACCESS_H
#include <QObject>
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
class Access : public QObject
class AccessPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Access")
public:
Access(QObject *parent = nullptr);
~Access();
AccessPortal(QObject *parent);
~AccessPortal();
public Q_SLOTS:
uint accessDialog(const QDBusObjectPath &handle,
uint AccessDialog(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......
......@@ -27,16 +27,16 @@
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeAppChooser, "xdg-desktop-portal-kde-app-chooser")
AppChooser::AppChooser(QObject *parent)
: QObject(parent)
AppChooserPortal::AppChooserPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
}
AppChooser::~AppChooser()
AppChooserPortal::~AppChooserPortal()
{
}
uint AppChooser::chooseApplication(const QDBusObjectPath &handle,
uint AppChooserPortal::ChooseApplication(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QStringList &choices,
......
......@@ -21,19 +21,19 @@
#ifndef XDG_DESKTOP_PORTAL_KDE_APPCHOOSER_H
#define XDG_DESKTOP_PORTAL_KDE_APPCHOOSER_H
#include <QObject>
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
class AppChooser : public QObject
class AppChooserPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.AppChooser")
public:
AppChooser(QObject *parent = nullptr);
~AppChooser();
AppChooserPortal(QObject *parent);
~AppChooserPortal();
public Q_SLOTS:
uint chooseApplication(const QDBusObjectPath &handle,
uint ChooseApplication(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QStringList &choices,
......
This diff is collapsed.
......@@ -32,23 +32,21 @@
#include "notification.h"
#include "print.h"
class DesktopPortal : public QDBusVirtualObject
class DesktopPortal : public QObject
{
Q_OBJECT
public:
explicit DesktopPortal(QObject *parent = nullptr);
~DesktopPortal();
bool handleMessage(const QDBusMessage &message, const QDBusConnection &connection) Q_DECL_OVERRIDE;
QString introspect(const QString &path) const Q_DECL_OVERRIDE;
private:
Access *m_access;
AppChooser *m_appChooser;
Email *m_email;
FileChooser *m_fileChooser;
Inhibit *m_inhibit;
Notification *m_notification;
Print *m_print;
AccessPortal *m_access;
AppChooserPortal *m_appChooser;
EmailPortal *m_email;
FileChooserPortal *m_fileChooser;
InhibitPortal *m_inhibit;
NotificationPortal *m_notification;
PrintPortal *m_print;
};
#endif // XDG_DESKTOP_PORTAL_KDE_DESKTOP_PORTAL_H
......
......@@ -26,16 +26,16 @@
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeEmail, "xdg-desktop-portal-kde-email")
Email::Email(QObject *parent)
: QObject(parent)
EmailPortal::EmailPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
}
Email::~Email()
EmailPortal::~EmailPortal()
{
}
uint Email::composeEmail(const QDBusObjectPath &handle, const QString &app_id, const QString &window, const QVariantMap &options, QVariantMap &results)
uint EmailPortal::ComposeEmail(const QDBusObjectPath &handle, const QString &app_id, const QString &window, const QVariantMap &options, QVariantMap &results)
{
Q_UNUSED(results)
......
......@@ -21,19 +21,19 @@
#ifndef XDG_DESKTOP_PORTAL_KDE_EMAIL_H
#define XDG_DESKTOP_PORTAL_KDE_EMAIL_H
#include <QObject>
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
class Email : public QObject
class EmailPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Email")
public:
Email(QObject *parent = 0);
~Email();
EmailPortal(QObject *parent);
~EmailPortal();
public Q_SLOTS:
uint composeEmail(const QDBusObjectPath &handle,
uint ComposeEmail(const QDBusObjectPath &handle,
const QString &app_id,
const QString &window,
const QVariantMap &options,
......
......@@ -29,12 +29,12 @@
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeFileChooser, "xdg-desktop-portal-kde-file-chooser")
// Keep in sync with qflatpakfiledialog from flatpak-platform-plugin
Q_DECLARE_METATYPE(FileChooser::Filter);
Q_DECLARE_METATYPE(FileChooser::Filters);
Q_DECLARE_METATYPE(FileChooser::FilterList);
Q_DECLARE_METATYPE(FileChooser::FilterListList);
Q_DECLARE_METATYPE(FileChooserPortal::Filter);
Q_DECLARE_METATYPE(FileChooserPortal::Filters);
Q_DECLARE_METATYPE(FileChooserPortal::FilterList);
Q_DECLARE_METATYPE(FileChooserPortal::FilterListList);
QDBusArgument &operator << (QDBusArgument &arg, const FileChooser::Filter &filter)
QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::Filter &filter)
{
arg.beginStructure();
arg << filter.type << filter.filterString;
......@@ -42,7 +42,7 @@ QDBusArgument &operator << (QDBusArgument &arg, const FileChooser::Filter &filte
return arg;
}
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooser::Filter &filter)
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::Filter &filter)
{
uint type;
QString filterString;
......@@ -55,7 +55,7 @@ const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooser::Filter
return arg;
}
QDBusArgument &operator << (QDBusArgument &arg, const FileChooser::FilterList &filterList)
QDBusArgument &operator << (QDBusArgument &arg, const FileChooserPortal::FilterList &filterList)
{
arg.beginStructure();
arg << filterList.userVisibleName << filterList.filters;
......@@ -63,10 +63,10 @@ QDBusArgument &operator << (QDBusArgument &arg, const FileChooser::FilterList &f
return arg;
}
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooser::FilterList &filterList)
const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooserPortal::FilterList &filterList)
{
QString userVisibleName;
FileChooser::Filters filters;
FileChooserPortal::Filters filters;
arg.beginStructure();
arg >> userVisibleName >> filters;
filterList.userVisibleName = userVisibleName;
......@@ -76,8 +76,8 @@ const QDBusArgument &operator >> (const QDBusArgument &arg, FileChooser::FilterL
return arg;
}
FileChooser::FileChooser(QObject *parent)
: QObject(parent)
FileChooserPortal::FileChooserPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
qDBusRegisterMetaType<Filter>();
qDBusRegisterMetaType<Filters>();
......@@ -85,11 +85,11 @@ FileChooser::FileChooser(QObject *parent)
qDBusRegisterMetaType<FilterListList>();
}
FileChooser::~FileChooser()
FileChooserPortal::~FileChooserPortal()
{
}
uint FileChooser::openFile(const QDBusObjectPath &handle,
uint FileChooserPortal::OpenFile(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......@@ -181,7 +181,7 @@ uint FileChooser::openFile(const QDBusObjectPath &handle,
return 1;
}
uint FileChooser::saveFile(const QDBusObjectPath &handle,
uint FileChooserPortal::SaveFile(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......
......@@ -23,9 +23,9 @@
#include <QDBusObjectPath>
#include <QMetaType>
#include <QObject>
#include <QDBusAbstractAdaptor>
class FileChooser : public QObject
class FileChooserPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.FileChooser")
......@@ -43,18 +43,18 @@ public:
} FilterList;
typedef QList<FilterList> FilterListList;
FileChooser(QObject *parent = 0);
~FileChooser();
FileChooserPortal(QObject *parent);
~FileChooserPortal();
public Q_SLOTS:
uint openFile(const QDBusObjectPath &handle,
uint OpenFile(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
const QVariantMap &options,
QVariantMap &results);
uint saveFile(const QDBusObjectPath &handle,
uint SaveFile(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......
......@@ -31,16 +31,16 @@
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeInhibit, "xdg-desktop-portal-kde-inhibit")
Inhibit::Inhibit(QObject *parent)
: QObject(parent)
InhibitPortal::InhibitPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
}
Inhibit::~Inhibit()
InhibitPortal::~InhibitPortal()
{
}
void Inhibit::inhibit(const QDBusObjectPath &handle, const QString &app_id, const QString &window, uint flags, const QVariantMap &options)
void InhibitPortal::Inhibit(const QDBusObjectPath &handle, const QString &app_id, const QString &window, uint flags, const QVariantMap &options)
{
qCDebug(XdgDesktopPortalKdeInhibit) << "Inhibit called with parameters:";
qCDebug(XdgDesktopPortalKdeInhibit) << " handle: " << handle.path();
......
......@@ -21,21 +21,21 @@
#ifndef XDG_DESKTOP_PORTAL_KDE_INHIBIT_H
#define XDG_DESKTOP_PORTAL_KDE_INHIBIT_H
#include <QObject>
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
#include "request.h"
class Inhibit : public QObject
class InhibitPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Inhibit")
public:
Inhibit(QObject *parent = 0);
~Inhibit();
InhibitPortal(QObject *parent);
~InhibitPortal();
public Q_SLOTS:
void inhibit(const QDBusObjectPath &handle,
void Inhibit(const QDBusObjectPath &handle,
const QString &app_id,
const QString &window,
uint flags,
......
......@@ -24,18 +24,19 @@
#include <QDBusMessage>
#include <QLoggingCategory>
Q_LOGGING_CATEGORY(XdgDesktopPortalKdeNotification, "xdg-desktop-portal-kde-notification")
Notification::Notification(QObject *parent)
: QObject(parent)
NotificationPortal::NotificationPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
}
Notification::~Notification()
NotificationPortal::~NotificationPortal()
{
}
void Notification::addNotification(const QString &app_id,
void NotificationPortal::AddNotification(const QString &app_id,
const QString &id,
const QVariantMap &notification)
{
......@@ -83,14 +84,14 @@ void Notification::addNotification(const QString &app_id,
notify->setProperty("app_id", app_id);
notify->setProperty("id", id);
connect(notify, static_cast<void (KNotification::*)(uint)>(&KNotification::activated), this, &Notification::notificationActivated);
connect(notify, &KNotification::closed, this, &Notification::notificationClosed);
connect(notify, static_cast<void (KNotification::*)(uint)>(&KNotification::activated), this, &NotificationPortal::notificationActivated);
connect(notify, &KNotification::closed, this, &NotificationPortal::notificationClosed);
notify->sendEvent();
m_notifications.insert(QString("%1:%2").arg(app_id, id), notify);
}
void Notification::notificationActivated(uint action)
void NotificationPortal::notificationActivated(uint action)
{
KNotification *notify = qobject_cast<KNotification*>(sender());
......@@ -113,7 +114,7 @@ void Notification::notificationActivated(uint action)
QDBusConnection::sessionBus().send(message);
}
void Notification::removeNotification(const QString &app_id,
void NotificationPortal::RemoveNotification(const QString &app_id,
const QString &id)
{
qCDebug(XdgDesktopPortalKdeNotification) << "RemoveNotification called with parameters:";
......@@ -127,7 +128,7 @@ void Notification::removeNotification(const QString &app_id,
}
}
void Notification::notificationClosed()
void NotificationPortal::notificationClosed()
{
KNotification *notify = qobject_cast<KNotification*>(sender());
......
......@@ -21,24 +21,24 @@
#ifndef XDG_DESKTOP_PORTAL_KDE_NOTIFICATION_H
#define XDG_DESKTOP_PORTAL_KDE_NOTIFICATION_H
#include <QObject>
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
#include <KNotification>
class Notification : public QObject
class NotificationPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Notification")
public:
Notification(QObject *parent = 0);
~Notification();
NotificationPortal(QObject *parent);
~NotificationPortal();
public Q_SLOTS:
void addNotification(const QString &app_id,
void AddNotification(const QString &app_id,
const QString &id,
const QVariantMap &notification);
void removeNotification(const QString &app_id,
void RemoveNotification(const QString &app_id,
const QString &id);
private Q_SLOTS:
void notificationActivated(uint action);
......
......@@ -237,16 +237,16 @@ static QPageSize::PageSizeId qt_idForPpdKey(const QString &ppdKey)
return QPageSize::Custom;
}
Print::Print(QObject *parent)
: QObject(parent)
PrintPortal::PrintPortal(QObject *parent)
: QDBusAbstractAdaptor(parent)
{
}
Print::~Print()
PrintPortal::~PrintPortal()
{
}
uint Print::print(const QDBusObjectPath &handle,
uint PrintPortal::Print(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......@@ -352,7 +352,7 @@ uint Print::print(const QDBusObjectPath &handle,
return 0;
}
uint Print::preparePrint(const QDBusObjectPath &handle,
uint PrintPortal::PreparePrint(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......@@ -694,7 +694,7 @@ uint Print::preparePrint(const QDBusObjectPath &handle,
return 0;
}
QStringList Print::destination(const QPrinter *printer, const QString &version)
QStringList PrintPortal::destination(const QPrinter *printer, const QString &version)
{
if (version == QLatin1String("lp")) {
return QStringList(QStringLiteral("-d")) << printer->printerName();
......@@ -707,7 +707,7 @@ QStringList Print::destination(const QPrinter *printer, const QString &version)
return QStringList();
}
QStringList Print::copies(const QPrinter *printer, const QString &version)
QStringList PrintPortal::copies(const QPrinter *printer, const QString &version)
{
int cp = printer->actualNumCopies();
......@@ -722,7 +722,7 @@ QStringList Print::copies(const QPrinter *printer, const QString &version)
return QStringList();
}
QStringList Print::jobname(const QPrinter *printer, const QString &version)
QStringList PrintPortal::jobname(const QPrinter *printer, const QString &version)
{
if (!printer->docName().isEmpty()) {
......@@ -740,7 +740,7 @@ QStringList Print::jobname(const QPrinter *printer, const QString &version)
}
// What about Upper and MultiPurpose? And others in PPD???
QString Print::mediaPaperSource(const QPrinter *printer)
QString PrintPortal::mediaPaperSource(const QPrinter *printer)
{
switch (printer->paperSource()) {
case QPrinter::Auto:
......@@ -776,7 +776,7 @@ QString Print::mediaPaperSource(const QPrinter *printer)
}
}
QStringList Print::optionOrientation(const QPrinter *printer, QPrinter::Orientation documentOrientation)
QStringList PrintPortal::optionOrientation(const QPrinter *printer, QPrinter::Orientation documentOrientation)
{
// portrait and landscape options rotate the document according to the document orientation
// If we want to print a landscape document as one would expect it, we have to pass the
......@@ -790,7 +790,7 @@ QStringList Print::optionOrientation(const QPrinter *printer, QPrinter::Orientat
}
}
QStringList Print::optionDoubleSidedPrinting(const QPrinter *printer)
QStringList PrintPortal::optionDoubleSidedPrinting(const QPrinter *printer)
{
switch (printer->duplex()) {
case QPrinter::DuplexNone:
......@@ -810,7 +810,7 @@ QStringList Print::optionDoubleSidedPrinting(const QPrinter *printer)
}
}
QStringList Print::optionPageOrder(const QPrinter *printer)
QStringList PrintPortal::optionPageOrder(const QPrinter *printer)
{
if (printer->pageOrder() == QPrinter::LastPageFirst) {
return QStringList(QStringLiteral("-o")) << QStringLiteral("outputorder=reverse");
......@@ -818,7 +818,7 @@ QStringList Print::optionPageOrder(const QPrinter *printer)
return QStringList(QStringLiteral("-o")) << QStringLiteral("outputorder=normal");
}
QStringList Print::optionCollateCopies(const QPrinter *printer)
QStringList PrintPortal::optionCollateCopies(const QPrinter *printer)
{
if (printer->collateCopies()) {
return QStringList(QStringLiteral("-o")) << QStringLiteral("Collate=True");
......@@ -826,7 +826,7 @@ QStringList Print::optionCollateCopies(const QPrinter *printer)
return QStringList(QStringLiteral("-o")) << QStringLiteral("Collate=False");
}
QStringList Print::optionPageMargins(const QPrinter *printer)
QStringList PrintPortal::optionPageMargins(const QPrinter *printer)
{
if (printer->printEngine()->property(QPrintEngine::PPK_PageMargins).isNull()) {
return QStringList();
......@@ -840,7 +840,7 @@ QStringList Print::optionPageMargins(const QPrinter *printer)
}
}
QStringList Print::optionCupsProperties(const QPrinter *printer)
QStringList PrintPortal::optionCupsProperties(const QPrinter *printer)
{
QStringList dialogOptions = printer->printEngine()->property(QPrintEngine::PrintEnginePropertyKey(0xfe00)).toStringList();
QStringList cupsOptions;
......@@ -861,7 +861,7 @@ QStringList Print::optionCupsProperties(const QPrinter *printer)
return cupsOptions;
}
QStringList Print::optionMedia(const QPrinter *printer)
QStringList PrintPortal::optionMedia(const QPrinter *printer)
{
if (!qt_keyForPageSizeId(printer->pageLayout().pageSize().id()).isEmpty() &&
!mediaPaperSource(printer).isEmpty()) {
......@@ -882,7 +882,7 @@ QStringList Print::optionMedia(const QPrinter *printer)
return QStringList();
}
QStringList Print::pages(const QPrinter *printer, bool useCupsOptions, const QString &version)
QStringList PrintPortal::pages(const QPrinter *printer, bool useCupsOptions, const QString &version)
{
if (printer->printRange() == QPrinter::PageRange) {
if (version == QLatin1String("lp")) {
......@@ -899,7 +899,7 @@ QStringList Print::pages(const QPrinter *printer, bool useCupsOptions, const QSt
return QStringList(); // AllPages
}
QStringList Print::cupsOptions(const QPrinter *printer, QPrinter::Orientation documentOrientation)
QStringList PrintPortal::cupsOptions(const QPrinter *printer, QPrinter::Orientation documentOrientation)
{
QStringList optionList;
......@@ -932,7 +932,7 @@ QStringList Print::cupsOptions(const QPrinter *printer, QPrinter::Orientation do
return optionList;
}
QStringList Print::printArguments(const QPrinter *printer, bool useCupsOptions,
QStringList PrintPortal::printArguments(const QPrinter *printer, bool useCupsOptions,
const QString &version, QPrinter::Orientation documentOrientation)
{
QStringList argList;
......@@ -964,7 +964,7 @@ QStringList Print::printArguments(const QPrinter *printer, bool useCupsOptions,
return argList;
}
bool Print::cupsAvailable()
bool PrintPortal::cupsAvailable()
{
// Ideally we would have access to the private Qt method
// QCUPSSupport::cupsAvailable() to do this as it is very complex routine.
......
......@@ -21,22 +21,22 @@
#ifndef XDG_DESKTOP_PORTAL_KDE_PRINT_H
#define XDG_DESKTOP_PORTAL_KDE_PRINT_H
#include <QObject>
#include <QDBusAbstractAdaptor>
#include <QDBusObjectPath>
#include <QDBusUnixFileDescriptor>
#include <QPrinter>
#include <QPageSize>
class Print : public QObject
class PrintPortal : public QDBusAbstractAdaptor
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.Print")
public:
Print(QObject *parent = nullptr);
~Print();
PrintPortal(QObject *parent);
~PrintPortal();
public Q_SLOTS:
uint print(const QDBusObjectPath &handle,
uint Print(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......@@ -44,7 +44,7 @@ public Q_SLOTS:
const QVariantMap &options,
QVariantMap &results);
uint preparePrint(const QDBusObjectPath &handle,
uint PreparePrint(const QDBusObjectPath &handle,
const QString &app_id,
const QString &parent_window,
const QString &title,
......
......@@ -35,7 +35,7 @@ int main(int argc, char *argv[])
if (sessionBus.registerService(QLatin1String("org.freedesktop.impl.portal.desktop.kde"))) {
DesktopPortal *desktopPortal = new DesktopPortal(&a);
if (sessionBus.registerVirtualObject(QLatin1String("/org/freedesktop/portal/desktop"), desktopPortal, QDBusConnection::VirtualObjectRegisterOption::SingleNode)) {
if (sessionBus.registerObject(QLatin1String("/org/freedesktop/portal/desktop"), desktopPortal, QDBusConnection::ExportAdaptors)) {
qCDebug(XdgDesktopPortalKde) << "Desktop portal registered successfuly";
} else {
qCDebug(XdgDesktopPortalKde) << "Failed to register desktop portal";
......
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