From 86dba586438d75053d0d3179262627ee672d8fb3 Mon Sep 17 00:00:00 2001 From: Luca Gugelmann Date: Mon, 26 Mar 2007 11:39:52 +0000 Subject: Avoid to use QUrl::toString, as per Davids suggestion. svn path=/trunk/KDE/kdebase/apps/; revision=646643 --- src/urlnavigator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/urlnavigator.cpp') 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 -- cgit v1.3