forked from qt-creator/qt-creator
ClangBackend: speedup qgetenv calls
Change-Id: I2968380064154844a8115413d3ebdcdb5748f254 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -44,7 +44,7 @@ ConnectionClient::ConnectionClient()
|
|||||||
{
|
{
|
||||||
processAliveTimer.setInterval(10000);
|
processAliveTimer.setInterval(10000);
|
||||||
|
|
||||||
const bool startAliveTimer = !qgetenv("QTC_CLANG_NO_ALIVE_TIMER").toInt();
|
static const bool startAliveTimer = !qEnvironmentVariableIntValue("QTC_CLANG_NO_ALIVE_TIMER");
|
||||||
|
|
||||||
if (startAliveTimer)
|
if (startAliveTimer)
|
||||||
connectAliveTimer();
|
connectAliveTimer();
|
||||||
|
|||||||
@@ -58,10 +58,9 @@ namespace {
|
|||||||
|
|
||||||
int getIntervalFromEnviromentVariable()
|
int getIntervalFromEnviromentVariable()
|
||||||
{
|
{
|
||||||
const QByteArray userIntervalAsByteArray = qgetenv("QTC_CLANG_DELAYED_REPARSE_TIMEOUT");
|
|
||||||
|
|
||||||
bool isConversionOk = false;
|
bool isConversionOk = false;
|
||||||
const int intervalAsInt = userIntervalAsByteArray.toInt(&isConversionOk);
|
const int intervalAsInt = qEnvironmentVariableIntValue("QTC_CLANG_DELAYED_REPARSE_TIMEOUT",
|
||||||
|
&isConversionOk);
|
||||||
|
|
||||||
if (isConversionOk)
|
if (isConversionOk)
|
||||||
return intervalAsInt;
|
return intervalAsInt;
|
||||||
|
|||||||
Reference in New Issue
Block a user