From 87baaee78dc1907b731f76bd5c6943642c6cf625 Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 21 Sep 2015 13:21:55 +0200 Subject: [PATCH] Clang: Add environment variable to disable alive timer Change-Id: I558ff0fe83cce9ee921819c6fd9c18534fad9bcf Reviewed-by: Nikolai Kosjar --- src/libs/clangbackendipc/connectionclient.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libs/clangbackendipc/connectionclient.cpp b/src/libs/clangbackendipc/connectionclient.cpp index 88d2e0b999f..da271d080fa 100644 --- a/src/libs/clangbackendipc/connectionclient.cpp +++ b/src/libs/clangbackendipc/connectionclient.cpp @@ -61,8 +61,12 @@ ConnectionClient::ConnectionClient(IpcClientInterface *client) { processAliveTimer.setInterval(10000); - connect(&processAliveTimer, &QTimer::timeout, - this, &ConnectionClient::restartProcessIfTimerIsNotResettedAndSocketIsEmpty); + const bool startAliveTimer = !qgetenv("QTC_CLANG_NO_ALIVE_TIMER").toInt(); + + if (startAliveTimer) { + connect(&processAliveTimer, &QTimer::timeout, + this, &ConnectionClient::restartProcessIfTimerIsNotResettedAndSocketIsEmpty); + } connect(&localSocket, static_cast(&QLocalSocket::error),