Clang: Stop sending data to backend on disconnect

This addresses

    SOFT ASSERT made fatal: "m_connection.isConnected()" in file
      src/plugins/clangcodemodel/clangbackendipcintegration.cpp, line 230

I could not reproduce the issue locally, so I'm leaving the soft asserts
untouched for now.

Change-Id: If1d55ba7bc7e2d1ac20ad992c6d0d43ceb0f5d73
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-10-07 12:11:01 +02:00
parent 88bcd6a304
commit 9730513698
4 changed files with 24 additions and 3 deletions

View File

@@ -51,6 +51,7 @@ ConnectionClient::ConnectionClient()
connectLocalSocketError();
connectLocalSocketConnected();
connectLocalSocketDisconnected();
}
void ConnectionClient::startProcessAndConnectToServerAsynchronously()
@@ -230,6 +231,14 @@ void ConnectionClient::connectLocalSocketConnected()
&ConnectionClient::resetProcessIsStarting);
}
void ConnectionClient::connectLocalSocketDisconnected()
{
connect(&localSocket,
&QLocalSocket::disconnected,
this,
&ConnectionClient::disconnectedFromLocalSocket);
}
void ConnectionClient::finishProcess()
{
finishProcess(std::move(process_));