Re: [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]

 



On Tue, 23 Jul 2019 15:52:04 +0300
"Yordan Karadzhov (VMware)" <y.karadz@xxxxxxxxx> wrote:

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

I applied and pushed out your other two patches, but didn't apply this
one. As we discussed at our 1:1, I think it's better to at a minimum,
just disable the "Capture" button, as that's the only thing that really
needs "root". If we can't read the events or the tracers, then they
will just stay empty or set to a single default value.

No reason to disable export and import settings, the user can do that,
but it wont help them much.

-- Steve


> 
> 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");




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

  Powered by Linux