dbus access problem

Ralf Habacker ralf.habacker at freenet.de
Mon Jul 14 10:28:52 CEST 2008


Hi,

currently I'm extending kdeinit4 with a save application close feature 
which calls the quit() method of /MainApplication over dbus using the 
following code:

    QDBusConnection connection = QDBusConnection::sessionBus();
    QDBusConnectionInterface *bus = connection.interface();
    const QStringList services = bus->registeredServiceNames();
    foreach(const QString &service, services) {
        if (!service.startsWith("org.kde"))
            continue;
        QDBusInterface *iface = new QDBusInterface(service,
                               QLatin1String("/MainApplication"),
                               QLatin1String("org.kde.KApplication"),
                               QDBusConnection::sessionBus());
        qDebug() << "killing " << service;
        iface->call("quit");
        qDebug() << iface->lastError();                                   

This code worked until yesterday without any problems.  Yesterday I 
updated to recent dbus svn source and now this code does not work anymore.

[3804] Debug:killing  "org.kde.kate-4724"
[3804] Debug:QDBusError("org.freedesktop.DBus.Error.UnknownInterface", 
"No such interface 'org.kde.KApplication' at object path 
'/MainApplication'")

The same behavior could be reproduced with qdbusviewer.

Regards
Ralf




using dbus dbus compiled from recent dbus svn source there is an access 
problem.


More information about the Kde-windows mailing list