forked from qt-creator/qt-creator
Clang: Ensure end command is send before waiting for process finish
This reverts
CmbIpc: Remove workaround
287a263083
since the bug still exists. However, we use waitForBytesWritten()
instead of QCoreApplication::processEvents() since this seems to be fine
(QAbstractSocket::waitForBytesWritten is not called on Windows).
The bug was:
1. Open a bigger project, like qtcreator.pro.
2. After 2 seconds, quit it.
==> The Qt Creator window is gone but the Qt Creator process waits
until the clangbackend process is finished.
Change-Id: I25c475d2a6db94a1c3a8d827a41f8c0b2624eaea
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -95,10 +95,17 @@ bool ConnectionClient::isConnected() const
|
||||
return localSocket.state() == QLocalSocket::ConnectedState;
|
||||
}
|
||||
|
||||
void ConnectionClient::ensureCommandIsWritten()
|
||||
{
|
||||
while (localSocket.bytesToWrite() > 0)
|
||||
localSocket.waitForBytesWritten();
|
||||
}
|
||||
|
||||
void ConnectionClient::sendEndCommand()
|
||||
{
|
||||
serverProxy_.end();
|
||||
localSocket.flush();
|
||||
ensureCommandIsWritten();
|
||||
}
|
||||
|
||||
void ConnectionClient::resetProcessAliveTimer()
|
||||
|
||||
Reference in New Issue
Block a user