branches/KDE/3.5/kdelibs/kio/kio

Alexander Neundorf neundorf at kde.org
Tue Nov 14 16:47:59 GMT 2006


On Tuesday 14 November 2006 14:44, Thiago Macieira wrote:
> Dirk Mueller wrote:
> >On Tuesday 14 November 2006 07:32, Alexander Neundorf wrote:
> >> > >url.prettyURL().mid(url.prettyURL().findRev('/')); or something
> >> > > like this ?
> >>
> >> I need only the filename part.
> >
> >can you try KURL::encode_string (or something like that on the
> > filename() ?
>
> I don't think you should do that.
>
> That would create something like file%0A.php, which is not a newline. A
> file name is not a URL, so percent-encoding doesn't apply.
>
> Maybe you should instead replace \n with QChar::replacement to indicate "a
> character that couldn't be displayed".

The issue I want to solve is the filename() returns the filename, which can 
still contain e.g. newlines. This is then used e.g. in konqys statusbar, 
which only works properly with one-line filenames. That's why I committed a 
patch which simply replaced \n with a space.
So your idea is basically almost what currently is in svn.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net




More information about the kde-core-devel mailing list