forked from qt-creator/qt-creator
Fix opening files created with file system filter
Using the "Create and Open" functionality of the file system locator
filter was no longer opening the file.
Amends 5ce704b394
Change-Id: Icb5bdad714d27e2cf74e47048d362e43e4247574
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -155,8 +155,12 @@ QList<LocatorFilterEntry> FileSystemFilter::matchesFor(QFutureInterface<LocatorF
|
||||
const QString fullFilePath = dirInfo.filePath(link.targetFilePath.fileName());
|
||||
const bool containsWildcard = entry.contains('?') || entry.contains('*');
|
||||
if (!containsWildcard && !QFileInfo::exists(fullFilePath) && dirInfo.exists()) {
|
||||
LocatorFilterEntry createAndOpen(this, tr("Create and Open \"%1\"").arg(entry), fullFilePath);
|
||||
createAndOpen.extraInfo = Utils::FilePath::fromString(dirInfo.absolutePath()).shortNativePath();
|
||||
LocatorFilterEntry createAndOpen(this,
|
||||
tr("Create and Open \"%1\"").arg(entry),
|
||||
fullFilePath);
|
||||
createAndOpen.filePath = FilePath::fromString(fullFilePath);
|
||||
createAndOpen.extraInfo = Utils::FilePath::fromString(dirInfo.absolutePath())
|
||||
.shortNativePath();
|
||||
entries[int(MatchLevel::Normal)].append(createAndOpen);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user