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
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
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);