linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org, howaboutsynergy@pm.me
Subject: Re: [PATCH 3/3] kernel-shark: Disable Capture if trace-cmd can't function
Date: Tue, 23 Jul 2019 19:06:12 -0400	[thread overview]
Message-ID: <20190723190612.51f0011f@gandalf.local.home> (raw)
In-Reply-To: <20190723125204.22799-4-y.karadz@gmail.com>

On Tue, 23 Jul 2019 15:52:04 +0300
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> 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@gmail.com>
> ---
>  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");


      reply	other threads:[~2019-07-23 23:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 12:52 [PATCH 0/3] Fixes needed befor KS 1.0 Yordan Karadzhov (VMware)
2019-07-23 12:52 ` [PATCH 1/3] kernel-shark: Make KsEventsCheckBoxWidget::removeSystem more robust Yordan Karadzhov (VMware)
2019-07-23 12:52 ` [PATCH 2/3] kernel-shark: Better error message for the constructor of KsCaptureControl Yordan Karadzhov (VMware)
2019-07-23 12:52 ` [PATCH 3/3] kernel-shark: Disable Capture if trace-cmd can't function Yordan Karadzhov (VMware)
2019-07-23 23:06   ` Steven Rostedt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190723190612.51f0011f@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=howaboutsynergy@pm.me \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).