Qt 4.8 QUrl.toLocalFile behavior change, impacts to KUrl (and friends)

Kevin Kofler kevin.kofler at chello.at
Sun Oct 30 21:34:48 GMT 2011


Thiago Macieira wrote:
>> 2. heuristically (replacing the current KUrl::KUrl and
>> KUrl::fromPathToUrl): * absolute paths should be file paths
>>* relative paths should be file paths (!) (currently, they're URLs)
>>* everything with a URL scheme (protocol) should be a URL
> 
> I disagree and will not implement this in QUrl.

You keep claiming this is not needed or useful, but how else would you 
suggest handling the use case of a network-transparent file dialog (or file 
requester, i.e. a line edit + an "open" button which brings up a file 
dialog, to be used in dialogs, see KUrlRequester) where the USER expects to 
be able to type in any of:
* an absolute path,
* a path relative to some local current directory or
* a URL, which will always be absolute?
Should all the code needing to handle something like this come with their 
own heuristics to handle this same user input?

Anyway, it can be implemented in KUrl (replacing or adding to the current 
heuristics, which are also not in QUrl).

        Kevin Kofler





More information about the kde-core-devel mailing list