> 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
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to