Utils: Replace Environment::isSameExecutable()

... by FilePath::isSameExecutable().

The only non-mechanical case is the use inside QmakeBuildSystem::testToolChain
using a build environment instead of the FilePath's device environment.

This make a difference in theory due to the use of PATHEXT in the actual
check, but I believe the case that someone creates a 'qmake.foo' and
a 'qmake.bar', adds .foo and .bar to PATHEXT and then complains that
there's a warning missing about not-matching mkspecs has zero
likelihood in reality (and will break other places in Creator anyway).

Change-Id: Id6a8d1e4dc2eb74ca81610ccb1c4ee94c6f47e12
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-11-21 12:29:17 +01:00
parent bf325fd6af
commit c7c6ddb8b0
9 changed files with 11 additions and 40 deletions

View File

@@ -325,9 +325,9 @@ void ToolChain::setCompilerCommand(const FilePath &command)
toolChainUpdated();
}
bool ToolChain::matchesCompilerCommand(const Utils::FilePath &command, const Environment &env) const
bool ToolChain::matchesCompilerCommand(const FilePath &command) const
{
return env.isSameExecutable(compilerCommand().toString(), command.toString());
return compilerCommand().isSameExecutable(command);
}
void ToolChain::setCompilerCommandKey(const QString &commandKey)