forked from qt-creator/qt-creator
Utils: Introduce a FilePath::refersToExecutableFile
... to avoid the need in user code to care for .exe and .bat suffixes. Change-Id: Ic249f14273f72c663912482555f98be1af923823 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -179,6 +179,10 @@ public:
|
||||
[[nodiscard]] FilePath searchInPath(const FilePaths &additionalDirs = {},
|
||||
PathAmending = AppendToPath) const;
|
||||
|
||||
enum MatchScope { ExactMatchOnly, WithExeSuffix, WithBatSuffix,
|
||||
WithExeOrBatSuffix, WithAnySuffix };
|
||||
bool refersToExecutableFile(MatchScope considerScript) const;
|
||||
|
||||
// makes sure that capitalization of directories is canonical
|
||||
// on Windows and macOS. This is rarely needed.
|
||||
[[nodiscard]] FilePath normalizedPathName() const;
|
||||
|
||||
Reference in New Issue
Block a user