From b8f8ce418e3b2bb00b6a5b4c75aebfb6e99147ef Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sun, 7 Jul 2024 20:40:21 +0300 Subject: Code reorganization and some improvements borrowed from kdbusnotification Signed-off-by: Mavridis Philippe --- src/main.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 278d754..c9b9e30 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,17 +19,12 @@ Improvements and feedback are welcome! *******************************************************************************/ -// TQt -#include - // TDE -#include #include #include -#include // Portal -#include "portal_service.h" +#include "portal_daemon.h" static const char description[] = I18N_NOOP("TDE XDG desktop portal"); @@ -48,17 +43,8 @@ int main(int argc, char **argv) if (!KUniqueApplication::start()) return 0; - KUniqueApplication app; - - TQT_DBusConnection connection = TQT_DBusConnection::sessionBus(); - if (!connection.isConnected()) - tqFatal("Failed to connect to session bus!"); - - if (!connection.requestName("org.freedesktop.impl.portal.desktop.tde")) - tqFatal("Failed to register XDG portal service!"); - - TDEPortalService portal(connection); - + PortalDaemon app; + app.disableSessionManagement(); return app.exec(); } -- cgit v1.2.1