It seems completely understandable to me. A URL is: > > URL = [scheme ":"] [authority] [path] ["?" query] ["#" fragment] > with > authority = "//" [userinfo "@"] [host] [":" port] > > (technically, a URL cannot have an empty scheme, but a "URL reference" can, > and QUrl parses like that) > > Since the input had no ":", there was no scheme. Since the input had no > "//", > it also had no authority. That means everything from the beginning until > "?" > or "#" was the path. > > Since there was no "?" or "#", everything in the input was parsed as path. >
Ok. I thought the scheme, host etc was being interpreted _after_ decoding the string. > > > Also, if we are getting a percent encoded 'string' from external source, > > whats the correct way of making it into a QUrl? > > The URL was parsed correctly as it came. The question is why your external > source gave you that URL which is not what you wanted it to be. > A Url like the one in this post is quite possible if it came as part of another url (eg: a url encoded as a parameter). Thanks for the clarification. -mandeep
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest