KURL::fromPathOrURL

Aaron J. Seigo aseigo at kde.org
Tue Jan 3 01:43:07 GMT 2006


hi ...

after noticing a few bugs related to lack of tilde expansion in file selection 
boxes, it seems that people are (reasonably) expecting KURL::fromPathOrURL to 
do this for them.

seeing as KShell::tildeExpand is fast, i'd like to apply the patch below to 
KURL and then remove the now-unecessary tildeExpand's from kdelibs/base. was 
there a reason fromPathOrURL doesn't tildeExpand?

Index: kdecore/kurl.cpp
===================================================================
--- ../../kdecore/kurl.cpp      (revision 492760)
+++ ../../kdecore/kurl.cpp      (working copy)
@@ -2369,7 +2369,7 @@
     if ( !text.isEmpty() )
     {
         if (!QDir::isRelativePath(text))
-            url.setPath( text );
+            url.setPath( KShell::tildeExpand( text ) );
         else
             url = text;
     }

-- 
Aaron J. Seigo
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060102/592f7b16/attachment.sig>


More information about the kde-core-devel mailing list