[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: [PATCH]: KURLDrag::decode() and the use of explicit
From: André_Wöbbeking <Woebbeking () onlinehome ! de>
Date: 2003-07-21 6:56:44
[Download RAW message or body]
Hi,
I sent this eMail two days ago to kde-core-devel but as I have no write
access to that list it wasn't approved yet :-( So I give it a try on
this list:
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?
["kurldrag.patch" (text/x-diff)]
Index: kdecore/kurldrag.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kurldrag.cpp,v
retrieving revision 1.19
diff -u -3 -p -r1.19 kurldrag.cpp
--- kdecore/kurldrag.cpp 19 May 2003 11:02:42 -0000 1.19
+++ kdecore/kurldrag.cpp 19 Jul 2003 00:59:36 -0000
@@ -73,7 +73,7 @@ bool KURLDrag::decode( const QMimeSource
QStrList lst;
bool ret = QUriDrag::decode( e, lst );
for (QStrListIterator it(lst); *it; ++it)
- uris.append(urlToString(*it));
+ uris.append(stringToUrl(*it));
return ret;
}
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic