KURL construction bug?

Andras Mantia amantia at kde.org
Fri Feb 27 21:12:16 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

 I've just noticed a strange (for me) behavior in the KURL. I'd like to 
construct a KURL from a string which is in a form of 
"/path/filename#reference". If I use:
KURL url;
url.setPath(string);

the url will have m_strPath = "/path/filename#reference" and the 
m_strRef_encoded member empty. And the KHTML part will fail on opening the 
file and going to the reference.

If I use KURL url("file:" + string) everything works correctly and 
m_strRef_encoded = "reference", m_strPath = "/path/filename".

Is that the desired behavior and I misunderstood the documentation or this is 
a bug in setPath() ?

Andras


- -- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAP7KwTQdfac6L/08RAmSnAKCmUPLxLw8JEV3k4k4UmRIlbX6XMwCeIclR
QdKt3+bWhpDS/j5iLyKyVgo=
=a4ua
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list