PATCH:KURL

David Faure dfaure at klaralvdalens-datakonsult.se
Tue Apr 29 01:28:39 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 29 April 2003 02:16, Dawit A. wrote:
> - Due to the above change we need to make KURL consistent in how it deals with 
> the file protocol. The changes in both ::url and ::prettyURL do exactly that 
> by returning file:/// by default instead of file:/.  This way not only are we 
> consistent in how the file protocol is supported, but we are also compatible 
> Mozilla and old Netscape (I think) which support this legacy behavior from 
> RFC 1738.

I don't think we want that. We want to _support_ this format, i.e. to parse it,
but we still want to show file:/ URLs by default. From a user perspective,
file:/// is horrifying.

> -Added a validate() (better name ?) function to give developers who manually 
> construct a KURL object the chance to make sure what they constructed is a 
> valid URL.
> 
> Why is this needed ? Because isValid() always returns false on all manually 
> constructed URLs.  Besides, manually constructing URLs, i.e. by-passing the 
> parser, might be convenient, but is one of the surest ways to construct 
> invalid URLs.  This function is intended to insure that will not happen 
> without forcing the developer or changing all the mutator functions to 
> perform parsing whenever they are asked to mutate the current state.

Shouldn't isValid() be fixed to work with manually-constructed KURLs instead?
(Disclaimer: I don't know if that's technically possible, I'm just looking at
it from the API point of view).

- -- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+rcc472KcVAmwbhARAiuRAKCfx/GqfyXB2Udekn0gfhVTdIYCGwCfce9P
1OGH392p2slZZQZbp2ylx/U=
=cy7f
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list