This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] use qdbus for Kopete's setOnlineStatus with two parameters

Tags: None
(comma "," separated)
Erik
Registered Member
Posts
24
Karma
0
OS
Looking at qdbusviewer I can see that org.kde.Kopete.setOnlineStatus Method has two parameters of type QString - status and message. If I set these strings in qdbusviewer, it works fine, updates both status and message.
The question is, how do I do this with qdbus?
Code: Select all
$ qdbus org.kde.kopete /Kopete org.kde.Kopete.setOnlineStatus 'away' 'test'
Invalid number of parameters

One parameter works and updates the status, but I want to update message too.
What is the correct way of separating parameters in qdbus? From what I've read, they should be separated by a space, but it doesn't work in my case.

Kde-4.2.2, qt-4.5.0, btw.


Erik, proud to be a member of KDE forums since the very beginning.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Likely a bug in QDBus. I found this method though, which might be able to help
qdbus org.kde.kopete /Kopete org.kde.Kopete.setStatusMessage


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Erik
Registered Member
Posts
24
Karma
0
OS
bcooksley wrote:Likely a bug in QDBus. I found this method though, which might be able to help
qdbus org.kde.kopete /Kopete org.kde.Kopete.setStatusMessage


Found this method too, but it doesn't seem to work at all.


Erik, proud to be a member of KDE forums since the very beginning.
Erik
Registered Member
Posts
24
Karma
0
OS
A workaround would be using dbus-send, e.g.:
Code: Select all
dbus-send  --session  --dest=org.kde.kopete  --type=method_call  --print-reply  --reply-timeout=2000  /Kopete org.kde.Kopete.setOnlineStatus string:online string:test


Erik, proud to be a member of KDE forums since the very beginning.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]