]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Avoid to use QUrl::toString, as per Davids suggestion.
authorLuca Gugelmann <luca.gugelmann@gmail.com>
Mon, 26 Mar 2007 11:39:52 +0000 (11:39 +0000)
committerLuca Gugelmann <luca.gugelmann@gmail.com>
Mon, 26 Mar 2007 11:39:52 +0000 (11:39 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=646643

src/urlnavigator.cpp

index ee06f558a101898950f9e4c5c14f0915b9c6a7d0..00edcfe503c8f7985c07ee36c51d076b9ebdb986 100644 (file)
@@ -152,7 +152,8 @@ KUrl UrlNavigator::url(int index) const
     assert(index >= 0);
     // keep scheme, hostname etc. maybe we will need this in the future
     // for e.g. browsing ftp repositories.
-    QString pre(((QUrl)url()).toString(QUrl::RemovePath));
+    KUrl newurl(url());
+    newurl.setPath(QString());
     QString path(url().path());
 
     if (!path.isEmpty()) {
@@ -162,7 +163,8 @@ KUrl UrlNavigator::url(int index) const
             path = path.section('/', 0, index);
     }
 
-    return KUrl(pre + path);
+    newurl.setPath(path);
+    return newurl;
 }
 
 const QLinkedList<UrlNavigator::HistoryElem>& UrlNavigator::history(int& index) const