aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/valgrind/valgrindengine.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2023-07-10 13:14:07 +0200
committerhjk <[email protected]>2023-07-10 13:23:11 +0000
commit9e84b09e991b30d6515eea40b60110a2b80f0a1c (patch)
tree3832f4b223d9bcb75affa0dcb715daf0720ebab4 /src/plugins/valgrind/valgrindengine.cpp
parent6ad4761604ed05acb04e8fbd9a90503876bf9699 (diff)
Valgrind: Some more direct FilePath use
Change-Id: I99db6996482cd5a14dcc4d68c55b22c64feef9fa Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/valgrind/valgrindengine.cpp')
-rw-r--r--src/plugins/valgrind/valgrindengine.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/valgrind/valgrindengine.cpp b/src/plugins/valgrind/valgrindengine.cpp
index 61ef89c3041..ee1484108c8 100644
--- a/src/plugins/valgrind/valgrindengine.cpp
+++ b/src/plugins/valgrind/valgrindengine.cpp
@@ -144,11 +144,13 @@ void ValgrindToolRunner::runnerFinished()
void ValgrindToolRunner::receiveProcessError(const QString &message, QProcess::ProcessError error)
{
if (error == QProcess::FailedToStart) {
- const QString valgrind = m_settings.valgrindExecutable.value();
- if (!valgrind.isEmpty())
- appendMessage(Tr::tr("Error: \"%1\" could not be started: %2").arg(valgrind, message), ErrorMessageFormat);
- else
+ const FilePath valgrind = m_settings.valgrindExecutable();
+ if (!valgrind.isEmpty()) {
+ appendMessage(Tr::tr("Error: \"%1\" could not be started: %2")
+ .arg(valgrind.toUserOutput(), message), ErrorMessageFormat);
+ } else {
appendMessage(Tr::tr("Error: no Valgrind executable set."), ErrorMessageFormat);
+ }
} else if (m_isStopping && error == QProcess::Crashed) { // process gets killed on stop
appendMessage(Tr::tr("Process terminated."), ErrorMessageFormat);
} else {