diff options
author | Mavridis Philippe <[email protected]> | 2024-07-07 20:40:21 +0300 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2024-07-07 20:40:21 +0300 |
commit | b8f8ce418e3b2bb00b6a5b4c75aebfb6e99147ef (patch) | |
tree | 1df3c198bdfb32a5a4d89548675759cbf2b9559e /src/main.cpp | |
parent | 30af69c9c08df296d31c73f73ecb448a923fab72 (diff) | |
download | xdg-desktop-portal-tde-b8f8ce418e3b2bb00b6a5b4c75aebfb6e99147ef.tar.gz xdg-desktop-portal-tde-b8f8ce418e3b2bb00b6a5b4c75aebfb6e99147ef.zip |
Code reorganization and some improvements borrowed from kdbusnotification
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
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 <tqdbusconnection.h> - // TDE -#include <kuniqueapplication.h> #include <tdeaboutdata.h> #include <tdecmdlineargs.h> -#include <tdelocale.h> // 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(); } |