[PATCH 08/11] kernel-shark qt: No error when Record authentication dialog is closed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No error message must be shown in the case when the user dismissed
the authentication dialog (clicked Cancel).

Signed-off-by: Yordan Karadzhov <ykaradzhov@xxxxxxxxxx>
---
 kernel-shark-qt/src/KsMainWindow.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/kernel-shark-qt/src/KsMainWindow.cpp b/kernel-shark-qt/src/KsMainWindow.cpp
index ffb10d4..d5b22dc 100644
--- a/kernel-shark-qt/src/KsMainWindow.cpp
+++ b/kernel-shark-qt/src/KsMainWindow.cpp
@@ -965,6 +965,14 @@ void KsMainWindow::_captureFinished(int exit, QProcess::ExitStatus st)
 
 	_captureLocalServer.close();
 
+	if (exit == 126) {
+		/*
+		 * Authorization could not be obtained because the user
+		 * dismissed the authentication dialog.
+		 */
+		return;
+	}
+
 	if (exit != 0 || st != QProcess::NormalExit) {
 		QString message = "Capture process failed:<br>";
 
-- 
2.17.1





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux