Cppcheck: Fix handling of default executable

On Unix we set the default just to cppcheck and mark it even as
valid if it can be found in PATH.
But when running we silently fail as we expect a full path before
launching the executable.
Use the effective binary instead.

Change-Id: I03393b1d227c595da5142fce6b8bea5210a15747
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Christian Stenger
2024-05-30 15:10:23 +02:00
parent a6fabc48a3
commit c3a1b41fb3

View File

@@ -101,7 +101,7 @@ void CppcheckTool::updateArguments()
arguments.push_back("--template=\"{file},{line},{severity},{id},{message}\""); arguments.push_back("--template=\"{file},{line},{severity},{id},{message}\"");
m_runner->reconfigure(s.binary(), arguments.join(' ')); m_runner->reconfigure(s.binary.effectiveBinary(), arguments.join(' '));
} }
QStringList CppcheckTool::additionalArguments(const CppEditor::ProjectPart &part) const QStringList CppcheckTool::additionalArguments(const CppEditor::ProjectPart &part) const