New Krazy check: Forbidden Qt classes

Sebastian Trüg strueg at mandriva.com
Thu Apr 26 15:28:49 BST 2007


On Thursday 26 April 2007 15:41:33 Thiago Macieira wrote:
> 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.

are you maybe talking of KUrl::url()? That would mean that I had to do sth 
like:

KUrl(QUrl).url()

right?

> > QDBusArgument >> QString
> > QUrl(QString)
>
> If the string was created using QUrl::url(), this is correct.




More information about the kde-core-devel mailing list