forked from qt-creator/qt-creator
Clang: Start ConnectionClient asynchronously
The connection client can block main thread at start up. This patch is removing the wait functions and using signals instead. Change-Id: I847c98b095752f6a875c0365bc27361bc5bdd051 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -331,12 +331,11 @@ void IpcCommunicator::initializeBackend()
|
||||
m_connection.setProcessAliveTimerInterval(30 * 1000);
|
||||
m_connection.setProcessPath(clangBackEndProcessPath);
|
||||
|
||||
connect(&m_connection, &ConnectionClient::processRestarted,
|
||||
connect(&m_connection, &ConnectionClient::connectedToLocalSocket,
|
||||
this, &IpcCommunicator::onBackendRestarted);
|
||||
|
||||
// TODO: Add a asynchron API to ConnectionClient, otherwise we might hang here
|
||||
if (m_connection.connectToServer())
|
||||
initializeBackendWithCurrentData();
|
||||
m_connection.startProcessAndConnectToServerAsynchronously();
|
||||
}
|
||||
|
||||
static QStringList projectPartOptions(const CppTools::ProjectPart::Ptr &projectPart)
|
||||
|
||||
Reference in New Issue
Block a user