HERC
23rd February 2010, 14:30
Hello,
I want to send a reply over DBUs before the end of my slot method. According to the QT document I have to use QDBusMessage QDBusMessage::createReply ( const QVariant & argument ) const.
Suppose I have the follow slot
int getValue(QString key);
How can I send a reply over the DBUS? I tried it like this
Int getValue(QString key) {
QDBusMessage msg;
QVariant v(2);
msg.createReply(v)
bus.send(msg);
Return 0;
}
Where
bus= QDBusConnection::sessionBus();
But I get the follow DBUS error
QDBusConnection: error: could not send invalid message to service “â€
I want to send a reply over DBUs before the end of my slot method. According to the QT document I have to use QDBusMessage QDBusMessage::createReply ( const QVariant & argument ) const.
Suppose I have the follow slot
int getValue(QString key);
How can I send a reply over the DBUS? I tried it like this
Int getValue(QString key) {
QDBusMessage msg;
QVariant v(2);
msg.createReply(v)
bus.send(msg);
Return 0;
}
Where
bus= QDBusConnection::sessionBus();
But I get the follow DBUS error
QDBusConnection: error: could not send invalid message to service “â€