Message ID | 20190723125204.22799-4-y.karadz@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Fixes needed befor KS 1.0 | expand |
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");
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");
In the case of an error all key buttons of the Record dialog are disabled. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- kernel-shark/src/KsCaptureDialog.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+)