Review Request: New method KUrl::List::toStringList(KUrl::AdjustPathOption)

Sebastian Trueg trueg at kde.org
Tue Aug 10 10:13:30 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4896/
-----------------------------------------------------------

(Updated 2010-08-10 09:13:29.496336)


Review request for kdelibs and David Faure.


Changes
-------

Before I commit this I would like to fix this issue in the test: apparently KUrl("ftp://ftp.kde.org///").url(RemoveTrailingSlash) == "ftp:///ftp.kde.org" which is weird since path(RemoveTrailingSlash) returns "/" and KUrl("ftp://ftp.kde.org/").url(RemoveTrailingSlash) == "ftp:///ftp.kde.org/".
Once this is resolved I will commit the patch.


Summary
-------

In the Nepomuk query API I need to convert a list of KUrls into strings, each with a trailing slash. Instead of adding my own code which clutters kdelibs and makes it less readable I did the obvious and added the KUrl::AdjustPathOption parameter to KUrl::List::toStringList which internally uses KUrl::url to convert urls to strings. The latter uses the same parameter. Thus, IMHO it is only natural to expose it in toStringList, too.


Diffs (updated)
-----

  trunk/KDE/kdelibs/kdecore/io/kurl.h 1159053 
  trunk/KDE/kdelibs/kdecore/io/kurl.cpp 1159053 
  trunk/KDE/kdelibs/kdecore/tests/kurltest.h 1159053 
  trunk/KDE/kdelibs/kdecore/tests/kurltest.cpp 1159053 

Diff: http://reviewboard.kde.org/r/4896/diff


Testing
-------


Thanks,

Sebastian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100810/81f83b30/attachment.htm>


More information about the kde-core-devel mailing list