[PATCH 3/3] kernel-shark: Disable Capture if trace-cmd can't function

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

 



In the case of an error all key buttons of the Record dialog are
disabled.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@xxxxxxxxx>
---
 kernel-shark/src/KsCaptureDialog.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/kernel-shark/src/KsCaptureDialog.cpp b/kernel-shark/src/KsCaptureDialog.cpp
index 2e6e8f9..2962917 100644
--- a/kernel-shark/src/KsCaptureDialog.cpp
+++ b/kernel-shark/src/KsCaptureDialog.cpp
@@ -74,6 +74,19 @@ KsCaptureControl::KsCaptureControl(QWidget *parent)
 		_topLayout.addWidget(errorLabel);
 
 		lamAddLine();
+
+		/* Disable all key buttons. */
+		QVector<QWidget *> widgets =
+			{&_importSettingsButton,
+			 &_exportSettingsButton,
+			 &_outputBrowseButton,
+			 &_pluginsComboBox,
+			 &_commandCheckBox,
+			 &_applyButton,
+			 &_captureButton};
+
+		for (auto &b: widgets)
+			b->setDisabled(true);
 	}
 
 	pluginList.prepend("nop");
-- 
2.20.1




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

  Powered by Linux