ClangBackend: speedup qgetenv calls

Change-Id: I2968380064154844a8115413d3ebdcdb5748f254
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Tim Jenssen
2016-09-23 14:40:21 +02:00
parent ee6b19cb39
commit 02c43d8a42
2 changed files with 3 additions and 4 deletions

View File

@@ -58,10 +58,9 @@ namespace {
int getIntervalFromEnviromentVariable()
{
const QByteArray userIntervalAsByteArray = qgetenv("QTC_CLANG_DELAYED_REPARSE_TIMEOUT");
bool isConversionOk = false;
const int intervalAsInt = userIntervalAsByteArray.toInt(&isConversionOk);
const int intervalAsInt = qEnvironmentVariableIntValue("QTC_CLANG_DELAYED_REPARSE_TIMEOUT",
&isConversionOk);
if (isConversionOk)
return intervalAsInt;