From kde-devel Sun Aug 09 18:04:51 2009 From: Kevin Krammer Date: Sun, 09 Aug 2009 18:04:51 +0000 To: kde-devel Subject: Re: QDBusConnection::registerObject: "Invalid object path given" - Message-Id: <200908092004.52035.kevin.krammer () gmx ! at> X-MARC-Message: https://marc.info/?l=kde-devel&m=124984119317957 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1496478831==" --===============1496478831== Content-Type: multipart/signed; boundary="nextPart1835222.8IhfNMZgTk"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1835222.8IhfNMZgTk Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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-propert= ie >s-with-dash-in-name/ > > [2] http://bugs.freedesktop.org/show_bug.cgi?id=3D20948 I think this is actually different. Object paths are quite thorougly specified in the D-Bus spec, so the name u= sed=20 in Matthew's example was just not valid. The problem about properties is that the signature of the property interfac= e=20 allows any kind of UTF-8 string to be used, however the Qt code to map thos= e=20 to QObject properties need to restrict this because it, as far as I underst= ood=20 it, wants to greate accessor methods for them and is thus restricted to=20 strings which are valid C++. It might be possible to map D-Bus properties into this kind of QObject=20 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= =20 use the introspection of the property interface to generate a property=20 QDBusInterface so you could to org::freedesktop::DBus::Properties interface(....); interface.Get( "your-dash-including-property" ); Cheers, Kevin =2D-=20 Kevin Krammer, KDE developer, xdg-utils developer KDE user support, developer mentoring --nextPart1835222.8IhfNMZgTk Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBKfw/EnKMhG6pzZJIRAmd6AJ9+Id4sC+2PTbvjfja1CsDCBe3RegCfStB0 ADVYObMiW1If2OemyKuHiOI= =8XHS -----END PGP SIGNATURE----- --nextPart1835222.8IhfNMZgTk-- --===============1496478831== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============1496478831==--