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

Scripting DBUS with bash: how to handle QPoint values

Tags: dbus, qdbus, dbus-send, kate, bash dbus, qdbus, dbus-send, kate, bash dbus, qdbus, dbus-send, kate, bash
(comma "," separated)
f1r3br4nd
Registered Member
Posts
16
Karma
0
I'm trying to write a script that inserts text into a document being edited from Kate with one keystroke.

It seems that instead of integers, the cursor location is passed as a QPoint data type. qdbus doesn't know what to do with it when it's returned by a function such as...

Code: Select all
qdbus org.kde.kate-XXXXX /Kate/Document/3 org.kde.KTextEditor.Document.endOfLine 1


dbus-send interprets this value as struct{int32:X int32:Y} but I can't figure out the syntax for passing it back to dbus-send, such as in the following command:

Code: Select all
dbus-send --session --dest=org.kde.kate-XXXXX --type=method_call /Kate/Document/3 org.kde.KTextEditor.Document.insertText array:int32:0,1 string:"FOO" boolean:false


If an array cannot be coerced to QPoint, then what can? Or am I just getting the array syntax wrong?

Thanks.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]