Commit 5d51bd93 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

Clang: Ensure end command is send before waiting for process finish

This reverts

    CmbIpc: Remove workaround

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
 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: default avatarMarco Bubke <>
parent 649acd35
......@@ -95,10 +95,17 @@ bool ConnectionClient::isConnected() const
return localSocket.state() == QLocalSocket::ConnectedState;
void ConnectionClient::ensureCommandIsWritten()
while (localSocket.bytesToWrite() > 0)
void ConnectionClient::sendEndCommand()
void ConnectionClient::resetProcessAliveTimer()
......@@ -97,7 +97,7 @@ private:
void disconnectProcessFinished() const;
void connectStandardOutputAndError() const;
void waitUntilSocketIsFlushed() const;
void ensureCommandIsWritten();
mutable std::unique_ptr<QProcess> process_;
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