A few thoughts about KUrl

Thiago Macieira thiago at kde.org
Thu Dec 21 15:59:09 GMT 2006


Jarosław Staniek wrote:
>> kurl.setPath("c:/") will be interpreted as kurl.setPath("/c:/") ? [no
>> in QUrl]
>
>How about using "%3A" instead of ':' ?

I don't think this is a good idea. Colons in pathnames are acceptable. But 
using %3A in a URL is equivalent to ':', so you'd just confuse other 
code.

Not to mention that it would break QUrl::toLocalFile().

>Then we'd have no problem in places where ':' is considered as a
> separator. Assume nobody should win32-specific absolute paths ("c:/")
> in portable code.

Separator?

>
>Let's see whether this could work...
>
> > Should KUrl("/") act as a relative path on windows ? (
> > KUrl("file:///C:/foo/bar") + KUrl("/") = KUrl("file:///C:/") ,
> > similar to "cd /" in windows console)
>
>Wouldn't using this side effect make the code unportable?

Do you mean KUrl("file:///C:/foo/bar").cd("/") -> "file:///C:/" ?
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20061221/fbeea55c/attachment.sig>


More information about the kde-core-devel mailing list