From 301017ab9cad66b037dfbc15ef26b21c0027f0d9 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 25 May 2023 10:15:25 +0200 Subject: [PATCH] Nim: Use FilePath::searchInPath to find executable Locally the same, potentially works remotely. Change-Id: Ibdd6f545c089868549f86300d00116896c4f8f94 Reviewed-by: Alessandro Portale Reviewed-by: --- src/plugins/nim/project/nimbuildsystem.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/nim/project/nimbuildsystem.cpp b/src/plugins/nim/project/nimbuildsystem.cpp index 97661644dcd..00d68034eb2 100644 --- a/src/plugins/nim/project/nimbuildsystem.cpp +++ b/src/plugins/nim/project/nimbuildsystem.cpp @@ -14,8 +14,6 @@ #include #include -#include - using namespace ProjectExplorer; using namespace Utils; @@ -180,10 +178,10 @@ FilePath nimPathFromKit(Kit *kit) FilePath nimblePathFromKit(Kit *kit) { // There's no extra setting for "nimble", derive it from the "nim" path. - const QString nimbleFromPath = QStandardPaths::findExecutable("nimble"); + const FilePath nimbleFromPath = FilePath("nimble").searchInPath(); const FilePath nimPath = nimPathFromKit(kit); const FilePath nimbleFromKit = nimPath.pathAppended("nimble").withExecutableSuffix(); - return nimbleFromKit.exists() ? nimbleFromKit.canonicalPath() : FilePath::fromString(nimbleFromPath); + return nimbleFromKit.exists() ? nimbleFromKit.canonicalPath() : nimbleFromPath; } bool NimBuildSystem::supportsAction(Node *context, ProjectAction action, const Node *node) const