forked from qt-creator/qt-creator
QmlDesigner: Fix the exit for qml puppet
Change-Id: I228e91711f6976e0e6d7b298d73f61cd8c25be23 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -102,7 +102,7 @@ void NodeInstanceClientProxy::initializeCapturedStream(const QString &fileName)
|
|||||||
bool inputStreamCanBeOpened = m_inputIoDevice->open(QIODevice::ReadOnly);
|
bool inputStreamCanBeOpened = m_inputIoDevice->open(QIODevice::ReadOnly);
|
||||||
if (!inputStreamCanBeOpened) {
|
if (!inputStreamCanBeOpened) {
|
||||||
qDebug() << "Input stream file cannot be opened: " << fileName;
|
qDebug() << "Input stream file cannot be opened: " << fileName;
|
||||||
QCoreApplication::exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (QCoreApplication::arguments().count() == 3) {
|
if (QCoreApplication::arguments().count() == 3) {
|
||||||
@@ -111,14 +111,14 @@ void NodeInstanceClientProxy::initializeCapturedStream(const QString &fileName)
|
|||||||
bool outputStreamCanBeOpened = m_outputIoDevice->open(QIODevice::WriteOnly);
|
bool outputStreamCanBeOpened = m_outputIoDevice->open(QIODevice::WriteOnly);
|
||||||
if (!outputStreamCanBeOpened) {
|
if (!outputStreamCanBeOpened) {
|
||||||
qDebug() << "Output stream file cannot be opened";
|
qDebug() << "Output stream file cannot be opened";
|
||||||
QCoreApplication::exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
} else if (QCoreApplication::arguments().count() == 4) {
|
} else if (QCoreApplication::arguments().count() == 4) {
|
||||||
m_controlStream.setFileName(QCoreApplication::arguments().at(3));
|
m_controlStream.setFileName(QCoreApplication::arguments().at(3));
|
||||||
bool controlStreamCanBeOpened = m_controlStream.open(QIODevice::ReadOnly);
|
bool controlStreamCanBeOpened = m_controlStream.open(QIODevice::ReadOnly);
|
||||||
if (!controlStreamCanBeOpened) {
|
if (!controlStreamCanBeOpened) {
|
||||||
qDebug() << "Control stream file cannot be opened";
|
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)) {
|
if (!compareCommands(command, controlCommand)) {
|
||||||
qDebug() << "Commands differ!";
|
qDebug() << "Commands differ!";
|
||||||
QCoreApplication::exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
} else if (m_outputIoDevice) {
|
} else if (m_outputIoDevice) {
|
||||||
QByteArray block;
|
QByteArray block;
|
||||||
|
@@ -109,5 +109,8 @@ int main(int argc, char *argv[])
|
|||||||
SetErrorMode(SEM_NOGPFAULTERRORBOX); //We do not want to see any message boxes
|
SetErrorMode(SEM_NOGPFAULTERRORBOX); //We do not want to see any message boxes
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return application.exec();
|
if (application.arguments().at(1) == "--readcapturedstream")
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return application.exec();;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user