Message ID | 20190809080623.7548-4-y.karadz@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Handle the case when KernelShark is started as Root | expand |
On Fri, 9 Aug 2019 11:06:23 +0300 "Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote: Typo in subject "standard". Other than that, it looks good. -- Steve > The error message is printed using the method KsMainWindow::_error(). > The message itself remains unchanged. If we want to change the message, > this can be done in another patch. > > Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> > --- > kernel-shark/src/KsMainWindow.cpp | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp > index e9c6d54..b462ded 100644 > --- a/kernel-shark/src/KsMainWindow.cpp > +++ b/kernel-shark/src/KsMainWindow.cpp > @@ -890,7 +890,6 @@ void KsMainWindow::_record() > #endif > > if (geteuid() && !canDoAsRoot) { > - QErrorMessage *em = new QErrorMessage(this); > QString message; > > message = "Record is currently not supported."; > @@ -899,8 +898,7 @@ void KsMainWindow::_record() > message += " ./cmake_clean.sh <br> cmake .. <br> make <br>"; > message += " sudo make install"; > > - em->showMessage(message); > - qCritical() << "ERROR: " << message; > + _error(message, "recordCantStart", false, false); > return; > } >
diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp index e9c6d54..b462ded 100644 --- a/kernel-shark/src/KsMainWindow.cpp +++ b/kernel-shark/src/KsMainWindow.cpp @@ -890,7 +890,6 @@ void KsMainWindow::_record() #endif if (geteuid() && !canDoAsRoot) { - QErrorMessage *em = new QErrorMessage(this); QString message; message = "Record is currently not supported."; @@ -899,8 +898,7 @@ void KsMainWindow::_record() message += " ./cmake_clean.sh <br> cmake .. <br> make <br>"; message += " sudo make install"; - em->showMessage(message); - qCritical() << "ERROR: " << message; + _error(message, "recordCantStart", false, false); return; }
The error message is printed using the method KsMainWindow::_error(). The message itself remains unchanged. If we want to change the message, this can be done in another patch. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- kernel-shark/src/KsMainWindow.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)