Bug in KURL handling(?)

David Faure faure at kde.org
Thu Dec 16 09:53:37 GMT 2004


On Wednesday 15 December 2004 22:22, Waldo Bastian wrote:
> On Wednesday 15 December 2004 21:58, Ingo Klöcker wrote:
> > FWIW, I just tried to following (Reminder: I'm using KDE_3_3_BRANCH): I
> > created a file called 'a#b' in $HOME. Then I opened Konqueror and
> > started to type "~/a" into the location bar. The auto-completion offers
> > ~/a#b. I select it and press Enter. "The file or folder ~/a#b does not
> > exist."
> > Huh? WTF? First Konqueror offers me the file via auto-completion and
> > then it tells me the file doesn't exist? (Deja-vu? I have the uncertain
> > feeling that I already brought exactly this example before.)
> >
> > IMO this whole situation is completely broken. A path which is entered
> > in Konqueror should be interpreted as path. Interpreting it as file URL
> > with omitted "file://" is just wrong. No user will understand that he
> > has to enter "~/a%23b" to open the file ~/a#b (even if auto-completion
> > is fixed so that it offers ~/a%23b instead of ~/a#b).
> >
> > The only sensible solution for this whole usability mess is that
> > anything without protocol is interpreted as path. And, of course, file
> > URLs which are not just simple path must not be crippled because
> > otherwise Konqueror won't understand them anymore correctly.
> >
> > Somehow this reminds me of the special handling of IDNs, with the
> > difference that for IDNs it's done correctly (i.e. the user never has
> > to enter xn--foo as domain name) while for path it's done wrongly
> > (because the user has to know the hex code of '#').
> 
> I agree. David, attached patch fixes prettyURL, will you fix Konqueror?

I agree with showing paths in the location bar (to be consistent with the completion,
and user's expectations), but NOT this way. Waldo: this breaks your own definition
of prettyURL, i.e. KURL(u.prettyURL()) == u. This won't be true anymore if prettyURL
can return a path. OK that's a prettyURL() without flags, but shouldn't the definition
hold for prettyURL-with-flags too? Apps are just bound to get it wrong otherwise
(and end up passing a path to KURL()).

I'll schedule some time to rework the konq patch, but I think this KURL change
is the wrong approach.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list