From 0e0f8b318e7bc2133f248084d22b8d723be03296 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Thu, 25 Jun 2015 12:53:59 +0200 Subject: [PATCH] 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: Nikolai Kosjar --- src/libs/clangbackendipc/connectionclient.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/libs/clangbackendipc/connectionclient.cpp b/src/libs/clangbackendipc/connectionclient.cpp index 10384f6a52b..0b803b8a407 100644 --- a/src/libs/clangbackendipc/connectionclient.cpp +++ b/src/libs/clangbackendipc/connectionclient.cpp @@ -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()