Sending boolean value using qdbus always yields true
Christian Esken
esken at kde.org
Thu Dec 24 19:32:11 GMT 2009
Am Donnerstag, 24. Dezember 2009 16:48:37 schrieb Thiago Macieira:
> Em Quinta-feira 24. Dezembro 2009, às 13.10.36, Christian Esken escreveu:
> > Hello,
> >
> > I have a problem with qdbus. No matter what I pass on the command line, I
> > always receive true. Details are on b.k.o. (Bug 201940), and Thiago says,
> > it is not a Qt issue.
> >
> > I added a debug statement to KMix [1], and it shows the effect clearly
> > [2].
> >
> > Does anybody know what is going on here? This is for a long time (bug
> > report from July 2009), and also for recent builds (via the openSUSE
> > build: KDE:Qt46 and KDE:KDE4:UNSTABLE:Desktop).
>
> Run both apps (qdbus and kmix) with QDBUS_DEBUG=1.
Done.
The terminal with qdbus shows contents=("Front:0", false)
The terminal with kmix shows contents=("Front:0", true)
Below is an excerpt of the output.
Christian
# qdbus org.kde.kmix /Mixer0 setMute Front:0 false
[...]
<method name="setMute">
<arg direction="in" type="s" name="deviceidx"/>
<arg direction="in" type="b" name="on"/>
</method>
[...]
QThread(ptr=0x60f500) sending message (blocking):
QDBusMessage(type=MethodCall, service="org.freedesktop.DBus",
path="/org/freedesktop/DBus", interface="org.freedesktop.DBus",
member="GetNameOwner", signature="", contents=("org.freedesktop.DBus") )
QThread(ptr=0x60f500) got message reply (blocking):
QDBusMessage(type=MethodReturn, service="org.freedesktop.DBus", signature="s",
contents=("org.freedesktop.DBus") )
Adding rule:
type='signal',sender='org.freedesktop.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',arg0='org.kde.kmix'
QThread(ptr=0x60f500) sending message (blocking):
QDBusMessage(type=MethodCall, service="org.kde.kmix", path="/Mixer0",
interface="", member="setMute", signature="", contents=("Front:0", false) )
QThread(ptr=0x60f500) got message reply (blocking):
QDBusMessage(type=MethodReturn, service=":1.92", signature="", contents=() )
# kmix --nofork
[...]
<method name="setMute">
<arg direction="in" type="s" name="deviceidx"/>
<arg direction="in" type="b" name="on"/>
</method>
[...]
Thread(ptr=0x610ab0) got message: QDBusMessage(type=MethodCall,
service=":1.111", path="/Mixer0", interface="", member="setMute",
signature="sb", contents=("Front:0", true) )
Mixer::setMute(): "Front:0" = true
QThread(ptr=0x610ab0) Automatically sending reply: ()
QThread(ptr=0x610ab0) sending message (no reply):
QDBusMessage(type=MethodReturn, service="", signature="", contents=() )
QThread(ptr=0x610ab0) got message: QDBusMessage(type=Signal,
service="org.freedesktop.DBus", path="/org/freedesktop/DBus",
interface="org.freedesktop.DBus", member="NameOwnerChanged", signature="sss",
contents=(":1.111", ":1.111", "") )
More information about the kde-core-devel
mailing list