branches/KDE/3.5/kdelibs/kio/kio

Alexander Neundorf neundorf at kde.org
Tue Nov 14 06:32:55 GMT 2006


Hi,

On Tuesday 14 November 2006 02:00, you wrote:
> Alexander Neundorf wrote:
> >int main()
> >{
> >   KURL url("http://www.neundorf.net/main.\nphp");
> >   QString pretty=url.prettyURL();
> >   QString filename=url.fileName();
> >   cout<<"pretty: -"<<pretty.latin1()<<"- name: -"<<filename.latin1
> >()<<"-"<<endl;
>
> This line is wrong:
> >   KURL url2(filename);
>
> This is KDE 3 code. You have to use KURL::fromPathOrURL().

Yes, it's for the 3.5 branch.

> > maybe it's just that KURL::bMalFormed is true, since just the filename
> > is probably no valid URL, is it ?
> >So, do I really have to do something like
> >url.prettyURL().mid(url.prettyURL().findRev('/')); or something like
> > this ?
>
> Huh? I didn't get this part.

I need only the filename part.

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