[PATCH]: KURLDrag::decode() and the use of explicit

André Wöbbeking Woebbeking at onlinehome.de
Sat Jul 19 09:14:28 BST 2003


Hi,

the attached patch fixes KURLDrag::decode(). Right now an encoded URL is 
encoded once more and not decoded (i.e. %B0 ('°') becomes %C3%82%C2%B0 
if your local encoding is UTF-8 or if you use any other protocol than 
file://).

This bug could be avoided if the contructors of KURL would be explicit. 
All the implicit casts in KDE and Qt make it difficult to read the code 
(you don't see what happens) and make it easy to oversee bugs like in 
KURLDrag::decode(). If you don't know what I mean then tell me what the 
following code does:

  KURL url(42);

With GCC 3.3 it compiles without any warning.


Cheers,
André


P.S.: can I apply the patch?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kurldrag.patch
Type: text/x-diff
Size: 582 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030719/cf7f369b/attachment.patch>


More information about the kde-core-devel mailing list