From kde-core-devel Tue Aug 11 16:29:32 2009 From: Chani Date: Tue, 11 Aug 2009 16:29:32 +0000 To: kde-core-devel Subject: Re: Review Request: Fix sanitization of dbus path in KMainWindow Message-Id: <200908110929.32953.chanika () gmail ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=125000829407878 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart78128902.cNCX59txos" --nextPart78128902.cNCX59txos Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On August 11, 2009 05:55:54 Thiago Macieira wrote: > Em Ter=E7a-feira 11 Agosto 2009, =E0s 13:56:01, Tom Albers escreveu: > > > On 2009-08-11 05:23:13, Chani wrote: > > > > how will this affect applications that do have a - in their name? a= nd > > > > applications that use the dbus interface of those apps? > > > > > > thomasl wrote: > > > As a dbus path attempt of "/some-app/MainWindow_1" is catched by = an > > > assertion in Qt (for being invalid) there's never been a chance that > > > you used it this way > > > > > > If we'd however catch the appName in KAboutData to align the dbus > > > path with e.g. qApp->applicationName(), this would -likely- affect at > > > least the KConfig rc path and possibly the way it registers with > > > KGlobalAction :-( > > > > > > (if anyone wonders, i had of course a much cooler "." in my faili= ng > > > app ;-) > > > > > > As the limitiation of the appName would be artificial, one could > > > also choose to change the dbus path system of KMainWindow to e.g. > > > "/MainWindows/MainWindow_1", "/MainWindows/MainWindow_2", etc. - but > > > that would break everything here :-( > > > > Concrete question: will: > > > > QDBusInterface dbus( "org.kde.plasma-desktop", "/App" ); > > > > change into > > > > QDBusInterface dbus( "org.kde.plasmadesktop", "/App" ); > > > > ? >=20 > No. >=20 > You're mixing interfaces and services. You can have dashes in service > names, so org.kde.plasma-desktop is perfectly valid: >=20 > $ qdbus org.kde.plasma-desktop > / > /App > /KBookmarkManager > /KBookmarkManager/kfilePlaces > /KIO > /KIO/Scheduler > /MainApplication > /kickoff > /kickoff/RecentAppDoc >=20 > However, you cannot have dashes in interface names: >=20 > $ qdbus org.kde.plasma-desktop /MainApplication > Invalid D-BUS interface name 'org.kde.plasma-desktop.PlasmaApp' found whi= le > parsing introspection >=20 > You cannot construct a QDBusInterface object with that interface name. Ev= en > if you could, the interface cannot be called because the bus will reject > such messages. If you try, you'll get disconnected. >=20 > That interface name is auto-created by QtDBus itself and should be fixed > there. >=20 oh btw, I've been wondering about this for a while... nobody else seems to= =20 have a problem with "kquitapp plasma-desktop", but for the last few months= =20 it's only worked for me on every third try. literally, every third one works. it's *weird*. I've always wondered if it = had=20 something to do with the dash. =2D-=20 This message brought to you by eevil bananas and the number 3. www.chani3.com --nextPart78128902.cNCX59txos 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) iEYEABECAAYFAkqBnGwACgkQeGbAwpIS3GzyrgCg0xYCs6eaP/kWOHvIZnmQR9G0 ZosAn11LMCC3s9wn1DM77pLoQUV0Knmo =0L4l -----END PGP SIGNATURE----- --nextPart78128902.cNCX59txos--