Commit 1c7fc450 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Wait that the sockets are written before abort

Change-Id: I0604d44da3c8e16bf4c3b26875ae6e976bd55c40
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 37b1dc87
......@@ -197,15 +197,20 @@ NodeInstanceServerProxy::~NodeInstanceServerProxy()
writeCommand(QVariant::fromValue(EndPuppetCommand()));
if (m_firstSocket)
if (m_firstSocket) {
m_firstSocket->waitForBytesWritten(1000);
m_firstSocket->abort();
}
if (m_secondSocket)
if (m_secondSocket) {
m_secondSocket->waitForBytesWritten(1000);
m_secondSocket->abort();
}
if (m_thirdSocket)
if (m_thirdSocket) {
m_thirdSocket->waitForBytesWritten(1000);
m_thirdSocket->abort();
}
if (m_qmlPuppetEditorProcess)
QTimer::singleShot(3000, m_qmlPuppetEditorProcess.data(), SLOT(terminate()));
......@@ -317,12 +322,20 @@ void NodeInstanceServerProxy::processFinished(int /*exitCode*/, QProcess::ExitSt
writeCommand(QVariant::fromValue(EndPuppetCommand()));
if (m_firstSocket)
if (m_firstSocket) {
m_firstSocket->waitForBytesWritten(1000);
m_firstSocket->abort();
if (m_secondSocket)
}
if (m_secondSocket) {
m_secondSocket->waitForBytesWritten(1000);
m_secondSocket->abort();
if (m_thirdSocket)
}
if (m_thirdSocket) {
m_thirdSocket->waitForBytesWritten(1000);
m_thirdSocket->abort();
}
if (exitStatus == QProcess::CrashExit)
emit processCrashed();
......
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