QUrl -> KUrl porting script

David Faure faure at kde.org
Wed Feb 26 06:29:28 UTC 2014


Hi Alex,

I guess you mean KUrl -> QUrl, rather :-)

On Tuesday 25 February 2014 23:16:23 Alex Merry wrote:
> The convert-kurl.pl script doesn't appear to actually convert any KUrl
> usages or API, as the comments at the top (and the name) suggest it
> should.  In fact, the git history suggests it never did.  Is there
> actually a script around to do this?

It does, but only a very tiny bit:
  # KDE4 code: url.adjustPath(KUrl::RemoveTrailingSlash);
        #     => url = url.adjusted(QUrl::StripTrailingSlash);

Everything else is indeed useless by now. The reason is:

kdelibs itself (branch frameworks) went from KUrl to
QUrlPathInfo (for many things that were missing a QUrl), this was a class I 
developed within kdelibs for possible submission into Qt later on.
But then further discussion with Thiago led to changing QUrl itself instead.
So kdelibs went
KUrl -> QUrlPathInfo -> QUrl,
and it's that second step that convert-kurl.pl is mostly about.

For other modules, who want to go KUrl -> QUrl, the script needs to be 
extended indeed. I just added that to my todo list.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the Kde-frameworks-devel mailing list