[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kfile
From:       Peter Penz <peter.penz19 () gmail ! com>
Date:       2010-08-27 15:28:20
Message-ID: 20100827152820.5A266AC857 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1168850 by ppenz:

Improve handling of incomplete URLs (see http://reviewboard.kde.org/r/5148). Thanks \
to Mark for providing the patch!

CCMAIL: markg85@gmail.com
BUG: 209031
FIXED-IN: 4.6.0



 M  +9 -5      kurlnavigator.cpp  


--- trunk/KDE/kdelibs/kfile/kurlnavigator.cpp #1168849:1168850
@@ -37,6 +37,7 @@
 #include <kprotocolinfo.h>
 #include <kurlcombobox.h>
 #include <kurlcompletion.h>
+#include <kurifilter.h>
 
 #include <QtCore/QDir>
 #include <QtCore/QLinkedList>
@@ -978,11 +979,14 @@
     KUrl url = newUrl;
     url.cleanPath();
 
-    QString urlStr = KUrlCompletion::replacedPath(url.url(), true, true);
-    if ((urlStr.length() > 0) && (urlStr.at(0) == '~')) {
-        // replace '~' by the home directory
-        urlStr.remove(0, 1);
-        urlStr.insert(0, QDir::homePath());
+    QString urlStr;
+    KUriFilterData urlData(url);
+    urlData.setCheckForExecutables(false);
+    if (KUriFilter::self()->filterUri(urlData, QStringList() << "kshorturifilter" << \
"kurisearchfilter")) { +        url = urlData.uri();
+        urlStr = urlData.uri().url();
+    } else {
+        urlStr = KUrlCompletion::replacedPath(url.url(), true, true);
     }
 
     if ((url.protocol() == QLatin1String("tar")) || (url.protocol() == \
QLatin1String("zip"))) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic