From e05769e6de6d73054a14ed5ba8d667895f3dcd4e Mon Sep 17 00:00:00 2001 From: Albert Vaca Cintora Date: Thu, 24 Sep 2020 23:13:55 +0200 Subject: [PATCH] Fix initial set of devices not being emitted in dbus --- core/daemon.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/daemon.cpp b/core/daemon.cpp index 57a9800d8..728e43cb5 100644 --- a/core/daemon.cpp +++ b/core/daemon.cpp @@ -79,6 +79,11 @@ void Daemon::init() #endif } + //Register on DBus + qDBusRegisterMetaType< QMap >(); + DBusHelper::sessionBus().registerService(QStringLiteral("org.kde.kdeconnect")); + DBusHelper::sessionBus().registerObject(QStringLiteral("/modules/kdeconnect"), this, QDBusConnection::ExportScriptableContents); + //Read remembered paired devices const QStringList& list = KdeConnectConfig::instance().trustedDevices(); for (const QString& id : list) { @@ -92,11 +97,6 @@ void Daemon::init() a->onStart(); } - //Register on DBus - qDBusRegisterMetaType< QMap >(); - DBusHelper::sessionBus().registerService(QStringLiteral("org.kde.kdeconnect")); - DBusHelper::sessionBus().registerObject(QStringLiteral("/modules/kdeconnect"), this, QDBusConnection::ExportScriptableContents); - NotificationServerInfo::instance().init(); qCDebug(KDECONNECT_CORE) << "Daemon started";