Message ID | 20181121151356.16901-10-ykaradzhov@vmware.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Small modifications and bug fixes toward KS 1.0 | expand |
On Wed, 21 Nov 2018 15:14:26 +0000 Yordan Karadzhov <ykaradzhov@vmware.com> wrote: > No error message must be shown in the case when the user dismissed > the authentication dialog (clicked Cancel). > > Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> > --- > kernel-shark-qt/src/KsMainWindow.cpp | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/kernel-shark-qt/src/KsMainWindow.cpp b/kernel-shark-qt/src/KsMainWindow.cpp > index ffb10d4..d5b22dc 100644 > --- a/kernel-shark-qt/src/KsMainWindow.cpp > +++ b/kernel-shark-qt/src/KsMainWindow.cpp > @@ -965,6 +965,14 @@ void KsMainWindow::_captureFinished(int exit, QProcess::ExitStatus st) > > _captureLocalServer.close(); > > + if (exit == 126) { Can we make a define for than number? Thanks, -- Steve > + /* > + * Authorization could not be obtained because the user > + * dismissed the authentication dialog. > + */ > + return; > + } > + > if (exit != 0 || st != QProcess::NormalExit) { > QString message = "Capture process failed:<br>"; >
diff --git a/kernel-shark-qt/src/KsMainWindow.cpp b/kernel-shark-qt/src/KsMainWindow.cpp index ffb10d4..d5b22dc 100644 --- a/kernel-shark-qt/src/KsMainWindow.cpp +++ b/kernel-shark-qt/src/KsMainWindow.cpp @@ -965,6 +965,14 @@ void KsMainWindow::_captureFinished(int exit, QProcess::ExitStatus st) _captureLocalServer.close(); + if (exit == 126) { + /* + * Authorization could not be obtained because the user + * dismissed the authentication dialog. + */ + return; + } + if (exit != 0 || st != QProcess::NormalExit) { QString message = "Capture process failed:<br>";
No error message must be shown in the case when the user dismissed the authentication dialog (clicked Cancel). Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> --- kernel-shark-qt/src/KsMainWindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+)