If the capture process finishes with an error the _captureError() slot will print an error message. We do not need to print identical message in _captureFinished(). However, we have to keep in mind that the process that we started is "pkexec" and the capture dialog is a child process of "pkexec". So if the capture dialog failed to start or crashed the "pkexec" process itself will have a normal exit, however its return value will be different from 0 (it will just pass the return value of the capture dialog executable). In this case _captureError() is not triggered, but we still want to see an error message. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx> --- kernel-shark/src/KsMainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp index 29d44d9..c127ad1 100644 --- a/kernel-shark/src/KsMainWindow.cpp +++ b/kernel-shark/src/KsMainWindow.cpp @@ -1180,7 +1180,7 @@ void KsMainWindow::_captureFinished(int ret, QProcess::ExitStatus st) return; } - if (ret != 0 || st != QProcess::NormalExit) { + if (ret != 0 || st == QProcess::NormalExit) { QString message = "Capture process failed:<br>"; message += capture->errorString(); -- 2.20.1