You are not logged in.

#1 2009-07-26 22:27:56

connexion2000
Member
Registered: 2006-10-15
Posts: 116

[SOLVED] Result of DBUS call (QT)

Hi,
I am writing some app with notification, but currently I am stuck. I wanted to add actions to notifications, but I don't know how to read the result. Here is the code:

    
knotify = new QDBusInterface("org.kde.VisualNotifications", "/VisualNotifications", "org.kde.VisualNotifications");
//some args initialisation
QDBusReply<QString> reply = knotify->callWithArgumentList(QDBus::Block, "Notify", args);
    if (reply.isValid())
        qDebug() << reply.value();
    else
        qDebug() << "Error";

Everything works nicely, popup is shown, but commandline shows "Error" that means QDBusReply is invalid.
How can I read the result of this function?
This should return ID of the notification for further usage.

Last edited by connexion2000 (2009-07-28 07:33:13)

Offline

#2 2009-07-27 12:17:31

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: [SOLVED] Result of DBUS call (QT)

Try:

qDebug() << reply.error()

http://doc.trolltech.com/4.5.1/qdbusreply.html

Then reference: http://doc.trolltech.com/4.5.1/qdbuserr … rType-enum

Edit: Fix link.

Last edited by scio (2009-07-27 12:18:50)

Offline

#3 2009-07-28 07:32:57

connexion2000
Member
Registered: 2006-10-15
Posts: 116

Re: [SOLVED] Result of DBUS call (QT)

scio wrote:

Bingo!

Didn't know such function exist. I tried to receive QString, but function returned uint. Thanks for help.

Offline

Board footer

Powered by FluxBB