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

List:       kde-core-devel
Subject:    Re: branches/KDE/3.5/kdelibs/kio/kio
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2006-11-14 16:47:59
Message-ID: 200611141748.00191.neundorf () kde ! org
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

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