Skip to content
Snippets Groups Projects
Commit 9f93c701 authored by dt's avatar dt
Browse files

Fix slowness of Locator if the string was "f \" or "f /".

The way we constructed the paths was just wrong, so we ended up
resolving lots of UNC paths.
parent 8bdfdba0
No related merge requests found
......@@ -74,14 +74,14 @@ QList<FilterEntry> FileSystemFilter::matchesFor(const QString &entry)
QDir::Name|QDir::IgnoreCase|QDir::LocaleAware);
foreach (const QString &dir, dirs) {
if (dir != "." && (name.isEmpty() || dir.startsWith(name, Qt::CaseInsensitive))) {
FilterEntry entry(this, dir, directory + "/" + dir);
FilterEntry entry(this, dir, dirInfo.filePath(dir));
entry.resolveFileIcon = true;
value.append(entry);
}
}
foreach (const QString &file, files) {
if (name.isEmpty() || file.startsWith(name, Qt::CaseInsensitive)) {
const QString fullPath = directory + "/" + file;
const QString fullPath = dirInfo.filePath(file);
FilterEntry entry(this, file, fullPath);
entry.resolveFileIcon = true;
value.append(entry);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment