Clang: Remove left-over functions

...that helped modifying the delayed parse timeout. Those are pointless
now (at least in the backend) because we have a non-blocking translation
unit (except for the first edit) around.

The only client using the timer value is currently
ClangCodeModelServer::registerUnsavedFilesForEditor - a case for which
no configuration should be needed.

Change-Id: I0f4171d6ee98bcac229aa5a207b6aa17b336a29a
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Nikolai Kosjar
2016-10-14 12:38:37 +02:00
parent 84d298e085
commit d29781fcd8

View File

@@ -55,34 +55,9 @@
namespace ClangBackEnd {
namespace {
int getIntervalFromEnviromentVariable()
{
bool isConversionOk = false;
const int intervalAsInt = qEnvironmentVariableIntValue("QTC_CLANG_DELAYED_REPARSE_TIMEOUT",
&isConversionOk);
if (isConversionOk)
return intervalAsInt;
else
return -1;
}
int delayedDocumentAnnotationsTimerInterval()
{
static const int defaultInterval = 1500;
static const int userDefinedInterval = getIntervalFromEnviromentVariable();
static const int interval = userDefinedInterval >= 0 ? userDefinedInterval : defaultInterval;
return interval;
}
} // anonymous
ClangCodeModelServer::ClangCodeModelServer()
: documents(projects, unsavedFiles)
, updateDocumentAnnotationsTimeOutInMs(delayedDocumentAnnotationsTimerInterval())
, updateDocumentAnnotationsTimeOutInMs(1500)
{
updateDocumentAnnotationsTimer.setSingleShot(true);