From 999d22084d497d139b693ea20fbd3dc9fd411856 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 29 Apr 2021 13:12:24 +0200 Subject: [PATCH] ProjectExplorer: Make runGcc work remotely Plus a style nit. Change-Id: I6f329926196cdbd9938e35437ab2be4e5bd1adc6 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/gcctoolchain.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index ae93c77039f..a8108e998a6 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -80,7 +80,7 @@ static const char binaryRegexp[] = "(?:^|-|\\b)(?:gcc|g\\+\\+|clang(?:\\+\\+)?)( static QByteArray runGcc(const FilePath &gcc, const QStringList &arguments, const QStringList &env) { - if (gcc.isEmpty() || !gcc.toFileInfo().isExecutable()) + if (!gcc.isExecutableFile()) return QByteArray(); SynchronousProcess cpp; @@ -91,8 +91,7 @@ static QByteArray runGcc(const FilePath &gcc, const QStringList &arguments, cons cpp.setTimeoutS(10); CommandLine cmdLine(gcc, arguments); SynchronousProcessResponse response = cpp.runBlocking(cmdLine); - if (response.result != SynchronousProcessResponse::Finished || - response.exitCode != 0) { + if (response.result != SynchronousProcessResponse::Finished || response.exitCode != 0) { Core::MessageManager::writeFlashing({"Compiler feature detection failure!", response.exitMessage(cmdLine.toUserOutput(), 10), QString::fromUtf8(response.allRawOutput())});