Valgrind: Also search in path before chickening out

Amends db2b09f4eb.

Change-Id: I1134fe2bc9441c12924332bb2666f108eb2f0d32
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2023-05-22 16:13:29 +02:00
parent cdf1926215
commit 27a63b0930

View File

@@ -56,7 +56,10 @@ void ValgrindToolRunner::start()
FilePath valgrindExecutable = m_settings.valgrindExecutable(); FilePath valgrindExecutable = m_settings.valgrindExecutable();
if (IDevice::ConstPtr dev = DeviceKitAspect::device(runControl()->kit())) if (IDevice::ConstPtr dev = DeviceKitAspect::device(runControl()->kit()))
valgrindExecutable = dev->filePath(valgrindExecutable.path()); valgrindExecutable = dev->filePath(valgrindExecutable.path());
if (!valgrindExecutable.isExecutableFile()) {
const FilePath found = valgrindExecutable.searchInPath();
if (!found.isExecutableFile()) {
reportFailure(Tr::tr("Valgrind executable \"%1\" not found or not executable.\n" reportFailure(Tr::tr("Valgrind executable \"%1\" not found or not executable.\n"
"Check settings or ensure valgrind is installed and available in PATH.") "Check settings or ensure valgrind is installed and available in PATH.")
.arg(valgrindExecutable.toUserOutput())); .arg(valgrindExecutable.toUserOutput()));