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.
This commit is contained in:
dt
2009-04-06 14:40:46 +02:00
parent 8bdfdba034
commit 9f93c7016e
+2 -2
View File
@@ -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);