--nextPart1837438.HEAinuJpl2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Alexander Neundorf wrote: > >int main() >{ > KURL url("http://www.neundorf.net/main.\nphp"); > QString pretty=3Durl.prettyURL(); > QString filename=3Durl.fileName(); > cout<<"pretty: -"<()<<"-"< This line is wrong: > KURL url2(filename); This is KDE 3 code. You have to use KURL::fromPathOrURL(). > QString pretty2(url2.prettyURL()); > cout<<"pretty2: -"< return 0; >} > >produces: > >~/src/tests/kde3kurl$ ./hello >pretty: -http://www.neundorf.net/main.%0Aphp- name: -main. >php- >pretty2: -main. >php- > >So it seems prettyURL()/lazy_encode() doesn't handle the newline. Or I'd say your first test pretty much showed that prettyURL() handles the=20 newline. See the %0A in the first line of your debug output. > 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. =2D-=20 =A0 Thiago Macieira =A0- =A0thiago (AT) macieira.info - thiago (AT) kde.org =A0 =A0 PGP/GPG: 0x6EF45358; fingerprint: =A0 =A0 E067 918B B660 DBD1 105C =A0966C 33F5 F005 6EF4 5358 --nextPart1837438.HEAinuJpl2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBFWRUhM/XwBW70U1gRAl6/AJ9Khh9T2Jbb70N9zGWXU6pMBxwk5wCgmcCp sjdJc706ROidEMpIx0FyQyU= =juDS -----END PGP SIGNATURE----- --nextPart1837438.HEAinuJpl2--