From c4e9616d27b42b62cf18b0593c9719920d294950 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 10 Jan 2023 16:05:29 +0100 Subject: [PATCH] Core: Support Env variables for "f" locator Fixes: QTCREATORBUG-242 Change-Id: Iebcb88be482a3f8f7500629032ee63180997dd0d Reviewed-by: Reviewed-by: Eike Ziller --- src/plugins/coreplugin/locator/filesystemfilter.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/coreplugin/locator/filesystemfilter.cpp b/src/plugins/coreplugin/locator/filesystemfilter.cpp index 1b6e1c1e250..647753539e4 100644 --- a/src/plugins/coreplugin/locator/filesystemfilter.cpp +++ b/src/plugins/coreplugin/locator/filesystemfilter.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -72,7 +73,11 @@ QList FileSystemFilter::matchesFor(QFutureInterface entries[int(MatchLevel::Count)]; - const QFileInfo entryInfo(entry); + + Environment env = Environment::systemEnvironment(); + const QString expandedEntry = env.expandVariables(entry); + + const QFileInfo entryInfo(expandedEntry); const QString entryFileName = entryInfo.fileName(); QString directory = entryInfo.path(); if (entryInfo.isRelative()) { @@ -139,10 +144,10 @@ QList FileSystemFilter::matchesFor(QFutureInterface