diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-05-04 11:49:31 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-05-05 12:10:50 +0000 |
commit | fda21898fbc9365c0503b9512e65134cf737181f (patch) | |
tree | 22049d7bdcf6fc5e8034d9dd5226de38c14243ea /src/tools/clangbackend/ipcsource/clangdocument.cpp | |
parent | 2a46b1521daa4d65cffd2b7fb00e68b4eec31f30 (diff) | |
download | qt-creator-fda21898fbc9365c0503b9512e65134cf737181f.tar.gz |
Clang: Simplify triggering initialization of supportive translation unit
Use a flag to indicate whether a supportive translation unit should be
set up. It will be needed in a follow-up change, too.
Change-Id: I6858caa303fcd9dca9486607380240dd5895a14a
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/tools/clangbackend/ipcsource/clangdocument.cpp')
-rw-r--r-- | src/tools/clangbackend/ipcsource/clangdocument.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tools/clangbackend/ipcsource/clangdocument.cpp b/src/tools/clangbackend/ipcsource/clangdocument.cpp index a267caa20d..9415db32fc 100644 --- a/src/tools/clangbackend/ipcsource/clangdocument.cpp +++ b/src/tools/clangbackend/ipcsource/clangdocument.cpp @@ -77,6 +77,7 @@ public: bool hasParseOrReparseFailed = false; bool isUsedByCurrentEditor = false; bool isVisibleInEditor = false; + bool increaseResponsiveness = false; }; DocumentData::DocumentData(const Utf8String &filePath, @@ -213,6 +214,23 @@ void Document::setDocumentRevision(uint revision) d->documentRevision = revision; } +bool Document::isResponsivenessIncreased() const +{ + return d->translationUnits.size() > 1; +} + +bool Document::isResponsivenessIncreaseNeeded() const +{ + checkIfNull(); + + return d->increaseResponsiveness; +} + +void Document::setResponsivenessIncreaseNeeded(bool responsivenessIncreaseNeeded) +{ + d->increaseResponsiveness = responsivenessIncreaseNeeded; +} + bool Document::isUsedByCurrentEditor() const { checkIfNull(); |