D
D
Denis2014-06-09 20:00:55
Qt
Denis, 2014-06-09 20:00:55

QDBus and signals: how to correctly dock signal activation when calling a DBus method?

There is a Controller class, the pause signal is described in it.
Registering an object and establishing a connection goes like this:

QDBusConnection conn = QDBusConnection::sessionBus();
if (! conn.registerService(SERVICE_NAME)) {
        qDebug() << "Error:" <<  conn.lastError().message();
        exit(EXIT_FAILURE);
}
Controller controller;
conn.registerObject(OBJECT_PATH, &controller, QDBusConnection::ExportAllSignals);

The constructor of the Controller class has this mess:
this->playback = new Playback(this);
    connect(this, SIGNAL(sig_pause()), playback, SLOT(pause()));

The idea is as follows: when the required method of the required object of the required DBus interface was accessed, a signal was activated.
What is now:
D-Bus Viewer shows the presence of a signal, but it cannot be called:
DbusObject::__call(): org.freedesktop.DBus.Error.UnknownInterface: No such interface 'my.iface' at object path '/my/control'

So far, I've stuck it through the usual method in which emit sig_pause () occurs;
WHAT?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question