From kde-core-devel Thu Apr 26 13:41:33 2007 From: "Thiago Macieira" Date: Thu, 26 Apr 2007 13:41:33 +0000 To: kde-core-devel Subject: Re: New Krazy check: Forbidden Qt classes Message-Id: <2724.172.26.0.1.1177594893.squirrel () 172 ! 26 ! 0 ! 1> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=117759494324950 Sebastian Trüg said: > On Thursday 26 April 2007 01:19:06 David Faure wrote: >> QUrl has dangerous/broken(imho) API, e.g. QUrl::toString() gives a >> string >> that cannot be parsed back as a url (like we do in many many places with >> KUrl::url(), e.g. over DBus), because e.g. a '#' in the path will appear >> as >> a '#' in QUrl::toString(), and QUrl(thatstring) will see it as a >> reference. > Now this is really a problem. I did it the same way to pass QUrls over > DBus as > strings: > > QDBusArgument << QUrl.toString Use QUrl::url() for that. It returns a QString that is parseable. > QDBusArgument >> QString > QUrl(QString) If the string was created using QUrl::url(), this is correct. -- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org PGP/GPG: 0x6EF45358; fingerprint: E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358