Commit 8f22b840 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Fix the exit for qml puppet

Change-Id: I228e91711f6976e0e6d7b298d73f61cd8c25be23
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent aa08da41
......@@ -102,7 +102,7 @@ void NodeInstanceClientProxy::initializeCapturedStream(const QString &fileName)
bool inputStreamCanBeOpened = m_inputIoDevice->open(QIODevice::ReadOnly);
if (!inputStreamCanBeOpened) {
qDebug() << "Input stream file cannot be opened: " << fileName;
QCoreApplication::exit(-1);
exit(-1);
}
if (QCoreApplication::arguments().count() == 3) {
......@@ -111,14 +111,14 @@ void NodeInstanceClientProxy::initializeCapturedStream(const QString &fileName)
bool outputStreamCanBeOpened = m_outputIoDevice->open(QIODevice::WriteOnly);
if (!outputStreamCanBeOpened) {
qDebug() << "Output stream file cannot be opened";
QCoreApplication::exit(-1);
exit(-1);
}
} else if (QCoreApplication::arguments().count() == 4) {
m_controlStream.setFileName(QCoreApplication::arguments().at(3));
bool controlStreamCanBeOpened = m_controlStream.open(QIODevice::ReadOnly);
if (!controlStreamCanBeOpened) {
qDebug() << "Control stream file cannot be opened";
QCoreApplication::exit(-1);
exit(-1);
}
}
......@@ -170,7 +170,7 @@ void NodeInstanceClientProxy::writeCommand(const QVariant &command)
if (!compareCommands(command, controlCommand)) {
qDebug() << "Commands differ!";
QCoreApplication::exit(-1);
exit(-1);
}
} else if (m_outputIoDevice) {
QByteArray block;
......
......@@ -109,5 +109,8 @@ int main(int argc, char *argv[])
SetErrorMode(SEM_NOGPFAULTERRORBOX); //We do not want to see any message boxes
#endif
return application.exec();
if (application.arguments().at(1) == "--readcapturedstream")
return 0;
return application.exec();;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment