Commit 0e0f8b31 authored by Marco Bubke's avatar Marco Bubke Committed by Nikolai Kosjar

Clang: Filter out connection errors

The connections server needs some time to start and so the first connect
can be fail. Don't print an error in that case.

Change-Id: I38fe5401cd47a4ad1a552dcbdfafcc851e5dd7cf
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent 05117213
......@@ -155,8 +155,6 @@ void ConnectionClient::restartProcessIfTimerIsNotResettedAndSocketIsEmpty()
bool ConnectionClient::connectToLocalSocket()
{
QThread::msleep(30);
for (int counter = 0; counter < 1000; counter++) {
localSocket.connectToServer(connectionName());
bool isConnected = localSocket.waitForConnected(20);
......@@ -198,9 +196,10 @@ void ConnectionClient::killProcess()
}
}
void ConnectionClient::printLocalSocketError(QLocalSocket::LocalSocketError /*socketError*/)
void ConnectionClient::printLocalSocketError(QLocalSocket::LocalSocketError socketError)
{
qWarning() << "ClangCodeModel ConnectionClient LocalSocket Error:" << localSocket.errorString();
if (socketError != QLocalSocket::ServerNotFoundError)
qWarning() << "ClangCodeModel ConnectionClient LocalSocket Error:" << localSocket.errorString();
}
void ConnectionClient::printStandardOutput()
......
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