[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: QDBusConnection::registerObject: "Invalid object path given" -
From: Kevin Krammer <kevin.krammer () gmx ! at>
Date: 2009-08-09 18:04:51
Message-ID: 200908092004.52035.kevin.krammer () gmx ! at
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Sunday, 2009-08-09, Jaroslav Barton wrote:
> Hi all,
>
> I has similar issue with property names exported via glib D-Bus [1],
> [2]. I think there are some unspecified details in D-Bus specification.
>
> [1]
> http://blog.djaara.net/wordpress/2009/03/31/qt-vs-d-bus-access-to-propertie
>s-with-dash-in-name/
>
> [2] http://bugs.freedesktop.org/show_bug.cgi?id=20948
I think this is actually different.
Object paths are quite thorougly specified in the D-Bus spec, so the name used
in Matthew's example was just not valid.
The problem about properties is that the signature of the property interface
allows any kind of UTF-8 string to be used, however the Qt code to map those
to QObject properties need to restrict this because it, as far as I understood
it, wants to greate accessor methods for them and is thus restricted to
strings which are valid C++.
It might be possible to map D-Bus properties into this kind of QObject
properties that do not have direct accessors, e.g. like when doing this
RandomQObject->setProperty( "myproperty", QVariant( "foo" ) );
However, you already discovered another workaround yourself, you might even
use the introspection of the property interface to generate a property
QDBusInterface so you could to
org::freedesktop::DBus::Properties interface(....);
interface.Get( "your-dash-including-property" );
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
["signature.asc" (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic