From kde-core-devel Tue Nov 14 06:32:55 2006 From: Alexander Neundorf Date: Tue, 14 Nov 2006 06:32:55 +0000 To: kde-core-devel Subject: Re: branches/KDE/3.5/kdelibs/kio/kio Message-Id: <200611140732.56412.neundorf () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=116348605021758 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: -"< >()<<"-"< > 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