This looks like a very ugly workaround, to me.
Does it.uri() return a QUrl, or a QString?
If a QString, then the problem is passing it to the QUrl constructor. QUrl in Qt4 is broken in that respect. (Fixed in Qt5).
Use KUrl instead, or use QUrl::fromEncoded(it.uri().toLatin1()). I'd prefer KUrl though, to keep this code readable and make it a one-char fix ;)
The problem is uri() return a QUrl, and the url inside it is already encoded. When it passed to createUDSEntryForUrl it actually encoded twice.
I wonder we should fix it in soprano or we should fix it when the original url is saved.
On June 18th, 2012, 6:09 a.m., Xuetian Weng wrote:
Review request for KDE Runtime and Ivan Čukić.
By Xuetian Weng.
Updated June 18, 2012, 6:09 a.m.
The query result for the Uri is already encoded to PercentEncoding, thus url.url() will not get the correct url.
Not sure this should always handled in this case, or soprano itself (uri()) should be fixed.