diff mbox series

[5/8] kernel-shark: Remove a duplicate error message

Message ID 20190709155650.2345-6-y.karadz@gmail.com (mailing list archive)
State Accepted
Headers show
Series Fixes needed befor KS 1.0 | expand

Commit Message

Yordan Karadzhov July 9, 2019, 3:56 p.m. UTC
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().

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 kernel-shark/src/KsMainWindow.cpp | 26 --------------------------
 1 file changed, 26 deletions(-)
diff mbox series

Patch

diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp
index 1e03632..752a17a 100644
--- a/kernel-shark/src/KsMainWindow.cpp
+++ b/kernel-shark/src/KsMainWindow.cpp
@@ -1143,35 +1143,9 @@  void KsMainWindow::_captureStarted()
 	_captureLocalServer.listen("KSCapture");
 }
 
-/**
- * If the authorization could not be obtained because the user dismissed
- * the authentication dialog (clicked Cancel), pkexec exits with a return
- * value of 126.
- */
-#define PKEXEC_DISMISS_RET	126
-
 void KsMainWindow::_captureFinished(int ret, QProcess::ExitStatus st)
 {
-	QProcess *capture = (QProcess *)sender();
-
 	_captureLocalServer.close();
-
-	if (ret == PKEXEC_DISMISS_RET) {
-		/*
-		 * Authorization could not be obtained because the user
-		 * dismissed the authentication dialog.
-		 */
-		return;
-	}
-
-	if (ret != 0 || st != QProcess::NormalExit) {
-		QString message = "Capture process failed:<br>";
-
-		message += capture->errorString();
-		message += "<br>Try doing:<br> sudo make install";
-
-		_error(message, "captureFinishedErr", false, false);
-	}
 }
 
 void KsMainWindow::_captureError(QProcess::ProcessError error)