Core: Drop a FilePath<->QFileInfo roundtrip in LocatorFilterEntry

Change-Id: I20323553c8be5dab7e6cc8bc39463f0e3d2c2c8d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2021-08-18 17:23:43 +02:00
parent 823e48a1fb
commit b52e30a33c

View File

@@ -178,10 +178,9 @@ QList<LocatorFilterEntry> BaseFileFilter::matchesFor(QFutureInterface<LocatorFil
QRegularExpressionMatch match = regexp.match(matchText);
if (match.hasMatch()) {
QFileInfo fi(path.toString());
LocatorFilterEntry filterEntry(this, fi.fileName(), QString(path.toString() + postfix));
LocatorFilterEntry filterEntry(this, path.fileName(), QString(path.toString() + postfix));
filterEntry.filePath = path;
filterEntry.extraInfo = FilePath::fromFileInfo(fi).shortNativePath();
filterEntry.extraInfo = path.shortNativePath();
const MatchLevel matchLevel = matchLevelFor(match, matchText);
if (hasPathSeparator) {