Fix initial set of devices not being emitted in dbus

This commit is contained in:
Albert Vaca Cintora 2020-09-24 23:13:55 +02:00
parent bd27aec9d2
commit e05769e6de

View file

@ -79,6 +79,11 @@ void Daemon::init()
#endif
}
//Register on DBus
qDBusRegisterMetaType< QMap<QString,QString> >();
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<QString,QString> >();
DBusHelper::sessionBus().registerService(QStringLiteral("org.kde.kdeconnect"));
DBusHelper::sessionBus().registerObject(QStringLiteral("/modules/kdeconnect"), this, QDBusConnection::ExportScriptableContents);
NotificationServerInfo::instance().init();
qCDebug(KDECONNECT_CORE) << "Daemon started";