Utils: Make FilePath::refersToExe(...) return the found item

... and use in on the CMake side.

Change-Id: Ib215ebc4f87beb67b6a302d0c42e7b955a2fa5b7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
hjk
2022-11-28 11:43:18 +01:00
parent 9e0ed9eeac
commit a146403596
5 changed files with 26 additions and 20 deletions

View File

@@ -419,7 +419,7 @@ bool FilePath::isExecutableFile() const
///
/// This is equivalent to \c isExecutableFile() in general.
/// On Windows, it will check appending various suffixes, too.
bool FilePath::refersToExecutableFile(MatchScope matchScope) const
std::optional<FilePath> FilePath::refersToExecutableFile(MatchScope matchScope) const
{
return fileAccess()->refersToExecutableFile(*this, matchScope);
}