[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/frameworks] kio/kfile: Implement TODO using QUrlPathInfo
From: David Faure <faure () kde ! org>
Date: 2012-04-30 19:59:52
Message-ID: 20120430195952.18E31A60A9 () git ! kde ! org
[Download RAW message or body]
Git commit 5f4b2cbeb4a1c935426e4c2b948bacfc06a2e9ef by David Faure.
Committed on 30/04/2012 at 21:57.
Pushed by dfaure into branch 'frameworks'.
Implement TODO using QUrlPathInfo
M +8 -6 kio/kfile/kurlcombobox.cpp
http://commits.kde.org/kdelibs/5f4b2cbeb4a1c935426e4c2b948bacfc06a2e9ef
diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp
index a235fb8..776a4c0 100644
--- a/kio/kfile/kurlcombobox.cpp
+++ b/kio/kfile/kurlcombobox.cpp
@@ -83,15 +83,17 @@ QString KUrlComboBoxPrivate::textForItem(const KUrlComboItem* item) const
const QUrl& url = item->url;
if (url.isLocalFile()) {
return QUrlPathInfo(url).localPath(myMode == KUrlComboBox::Directories
- ? QUrlPathInfo::AppendTrailingSlash
- : QUrlPathInfo::StripTrailingSlash);
+ ? QUrlPathInfo::AppendTrailingSlash
+ : QUrlPathInfo::StripTrailingSlash);
} else {
+ QUrlPathInfo urlInfo(url);
+ urlInfo.setPath(urlInfo.path(myMode == KUrlComboBox::Directories
+ ? QUrlPathInfo::AppendTrailingSlash
+ : QUrlPathInfo::StripTrailingSlash));
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
- return url.toString();
+ return urlInfo.url().toString();
#else
- return url.toDisplayString(myMode == KUrlComboBox::Directories
- ? QUrl::None /* Qt5 TODO! QUrl::AppendTrailingSlash */
- : QUrl::StripTrailingSlash);
+ return urlInfo.url().toDisplayString();
#endif
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic