summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Reininghaus <frank78ac@googlemail.com>2012-01-25 20:30:57 (GMT)
committerFrank Reininghaus <frank78ac@googlemail.com>2012-01-25 20:32:49 (GMT)
commit80d9bfec580bf01b0ee584fc4bb46e3d59a0ba7c (patch)
tree30525b798049601301620dd396dfe0413d9fe44b
parent7dfe3632f52d30f79f1c21c9acbaf68c05d63006 (diff)
Handle folder names containing spaces correctly in the Folders Panel
The problem was that KFileItemModel::setExpanded() used KUrl::url() to determine the names of the subfolders. This method encodes special characters, such that comparing the folder names with the unencoded URLs stored in the model fails. Using KUrl::path(), which does not encode special characters, fixes the problem. BUG: 291781 FIXED-IN: 4.8.1
-rw-r--r--dolphin/src/kitemviews/kfileitemmodel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/dolphin/src/kitemviews/kfileitemmodel.cpp b/dolphin/src/kitemviews/kfileitemmodel.cpp
index b1a5fec..fb08907 100644
--- a/dolphin/src/kitemviews/kfileitemmodel.cpp
+++ b/dolphin/src/kitemviews/kfileitemmodel.cpp
@@ -482,7 +482,7 @@ void KFileItemModel::setExpanded(const QSet<KUrl>& urls)
return;
}
- const int pos = dirLister->url().url().length();
+ const int pos = dirLister->url().path().length();
// Assure that each sub-path of the URLs that should be
// expanded is added to m_urlsToExpand too. KDirLister
@@ -493,7 +493,7 @@ void KFileItemModel::setExpanded(const QSet<KUrl>& urls)
const KUrl& url = it1.next();
KUrl urlToExpand = dirLister->url();
- const QStringList subDirs = url.url().mid(pos).split(QDir::separator());
+ const QStringList subDirs = url.path().mid(pos).split(QDir::separator());
for (int i = 0; i < subDirs.count(); ++i) {
urlToExpand.addPath(subDirs.at(i));
m_urlsToExpand.insert(urlToExpand);