From: Luca Gugelmann Date: Mon, 26 Mar 2007 11:39:52 +0000 (+0000) Subject: Avoid to use QUrl::toString, as per Davids suggestion. X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/86dba586438d75053d0d3179262627ee672d8fb3?ds=inline Avoid to use QUrl::toString, as per Davids suggestion. svn path=/trunk/KDE/kdebase/apps/; revision=646643 --- diff --git a/src/urlnavigator.cpp b/src/urlnavigator.cpp index ee06f558a..00edcfe50 100644 --- a/src/urlnavigator.cpp +++ b/src/urlnavigator.cpp @@ -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::history(int& index) const