Valgrind: Do not start valgrind if it does not exist

...and print a warning with some user hint inside the application
output instead.
Drive-by fix: silence a soft assert in case of a failed start of
callgrind.

Fixes: QTCREATORBUG-28988
Change-Id: I4fd0253e1f18489031e2f6cfa276c4df5ea4483a
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2023-05-16 11:19:31 +02:00
parent 796cfceb3a
commit db2b09f4eb
3 changed files with 12 additions and 15 deletions

View File

@@ -258,7 +258,8 @@ void CallgrindToolRunner::triggerParse()
}
const auto afterCopy = [this](expected_str<void> res) {
QTC_ASSERT_EXPECTED(res, return);
if (!res) // failed to run callgrind
return;
showStatusMessage(Tr::tr("Parsing Profile Data..."));
m_parser.parse(m_hostOutputFile);
};