[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    RE: KURL
From:       David Faure <David.Faure () cramersystems ! com>
Date:       2000-02-17 16:26:52
[Download RAW message or body]

> On Thu, 17 Feb 2000, Stefan Taferner wrote:
> 
> > On Thu, 17 Feb 2000, David Faure wrote:
> > [...]
> > > The construction KURL url( QDir::currentDirPath()+"/", 
> args->arg(i) );
> > > allows to cope with everything. Full urls, full paths, 
> and local filenames.
> > > The current dir is used as a base URL if the second argument
> > > isn't an absolute path.
> > 
> > Would it be possible to do the  + "/"  inside of KURL?
> > Somehow it looks strange to request it to be given extra, as usual
> > path names don't have it.
> 
> That would make other contructs uglier. Suppose, you have an 
> url to a html
> page: oldURL = http://some.host/some/path/somefile.html
> 
> Now you get a link in there pointing to a relative url
> anotherfile.html . At the moment, you can just do:
> 
> KURL newURL(oldURL, relURL);
> 
> Inlcuding the "/" into KURL would give you:
> 
> newURL = http://some.host/some/path/somefile.html/anotherfile.html
> 
> which is not what you want.

I knew there was something like this, thanks for detailing it.

Stefan: if KCmdLineArgs is fixed (and possibly uses this KURL feature),
then there is no problem of dirty API. I guess 99% of the time, this
problem happens with command line arguments.

--
David Faure
faure@kde.org - KDE developer
david@mandrakesoft.com - Mandrake
david.faure@cramersystems.com - Cramer Systems

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic