@@ -314,6 +314,7 @@ KsCaptureMonitor::KsCaptureMonitor(QWidget *parent)
: QWidget(parent),
_mergedChannels(false),
_argsModified(false),
+ _captureStatus(false),
_panel(this),
_name("Output display", this),
_space("max size ", this),
@@ -448,6 +449,9 @@ void KsCaptureMonitor::_captureFinished(int exit, QProcess::ExitStatus status)
_consolOutput.appendPlainText(errMessage);
QCoreApplication::processEvents();
+ _captureStatus = false;
+ } else {
+ _captureStatus = true;
}
}
@@ -531,8 +535,12 @@ void KsCaptureDialog::_setChannelMode(int state)
void KsCaptureDialog::_sendOpenReq(const QString &fileName)
{
- QLocalSocket *socket = new QLocalSocket(this);
+ QLocalSocket *socket;
+
+ if (!_captureMon._captureStatus)
+ return;
+ socket = new QLocalSocket(this);
socket->connectToServer("KSCapture", QIODevice::WriteOnly);
if (socket->waitForConnected()) {
QByteArray block;
@@ -119,6 +119,8 @@ public:
*/
bool _argsModified;
+ bool _captureStatus;
+
private:
QVBoxLayout _layout;
In the case when the recording process failed, the Capture dialog should not send a signal to the KernelShark GUI to open a new tracing data file. Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- kernel-shark/src/KsCaptureDialog.cpp | 10 +++++++++- kernel-shark/src/KsCaptureDialog.hpp | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-)