Init KDEDModule after kamd?

Daniel Nicoletti dantti12 at gmail.com
Fri Mar 8 21:01:44 UTC 2013


> if(watcher->connection().isConnected())
>             init.....
This afaik is wrong, is connected with DBus.

You should actuall setup the watcher and at
the init do a call like:

QDBusMessage message;
    message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.DBus"),
                                             QLatin1String("/"),

QLatin1String("org.freedesktop.DBus"),
                                             QLatin1String("NameHasOwner"));

    message << qVariantFromValue("org.kde.kamd.....");

    QDBusReply<bool> reply = connection.call(message);
    bool connected = reply.value();

This call will block KDED so please adjust to the non-blocking call.


--
Daniel Nicoletti

KDE Developer - http://dantti.wordpress.com


More information about the Plasma-devel mailing list