Commit 416877ed authored by David Redondo's avatar David Redondo 🏎

Export adaptor before claiming org.kde.ksystemstats name

Otherwise clients looking for the interface will receive an error when the name
is announced but there is not the wanted interface.
parent 4f11610a
...@@ -80,9 +80,9 @@ void KSysGuardDaemon::init(ReplaceIfRunning replaceIfRunning) ...@@ -80,9 +80,9 @@ void KSysGuardDaemon::init(ReplaceIfRunning replaceIfRunning)
if (replaceIfRunning == ReplaceIfRunning::Replace) { if (replaceIfRunning == ReplaceIfRunning::Replace) {
options |= KDBusService::Replace; options |= KDBusService::Replace;
} }
QDBusConnection::sessionBus().registerObject("/", this, QDBusConnection::ExportAdaptors);
auto service = new KDBusService(options , this); auto service = new KDBusService(options , this);
service->setExitValue(1); service->setExitValue(1);
QDBusConnection::sessionBus().registerObject("/", this, QDBusConnection::ExportAdaptors);
} }
void KSysGuardDaemon::loadProviders() void KSysGuardDaemon::loadProviders()
......
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