...because both are conditions:
ExpirationReason --> ExpirationCondition
Condition --> RunCondition
Change-Id: Iae79b11c20618574fac8142710b11b5c16339127
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Do what can be done in the constructor instead of relying on the
clients.
Change-Id: I5f475b5309afb37e34d228e54ad3c12f1698d72b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
...and where applicable, ensure that a warning is printed once a
jobrequest type is not handled.
Change-Id: Ida0b5a175947ebf75c1c4e5116a77f0270825336
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Change unsaved file to provide constructor overloads
for std::make_unique, std::make_shared and
QSharedPointer::create
Example:
// Provide Foo constructor signatures at <Cursor>
std::make_unique<Foo>(<Cursor>
Task-number: QTCREATORBUG-18615
Change-Id: I87dd17085adf99ee498db969a3cdda5ebd973476
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Invoke follow symbol in clang backend
if env variable QTC_CLANG_FOLLOW_SYMBOL is 1.
Does not include backend implementation.
Change-Id: Ia20a677830ebdd7f24800af5c5d6e8b1bf579205
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...to free some memory.
The translation units of the 7 most recently used documents ("hot
documents", tracked by document visibility) are kept in memory.
Translation units of other documents are suspended and will be resumed
once they become visible again.
The resumption of a translation unit needs the same time as reparse
(since it is a reparse effectively).
The number of hot documents can be modified by the run time environment
variable QTC_CLANG_HOT_DOCUMENTS=N. Visible documents are always hot.
Task-number: QTCREATORBUG-11640
Change-Id: I68ecd2b1373e303372300203e42d90f65a4b39b3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This is in preparation for a follow-up change that will add jobs that
also operate on invisible documents.
Change-Id: I2a0fc3b95cc5ab2e267429134a534df64c901376
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Make it a class enum and remove some noise.
Change-Id: Icd83f680c0df5eed0579c853ce5b4615e7822a28
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
...to avoid ambiguity in regard to a new enum in a follow-up change.
Change-Id: I4f732b5200ed674b6708510ac8de0a795afe52da
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This simplifies the high level client ClangCodeModelServer and removes
quite some duplication in tests.
Change-Id: I4c6ab8646c8728990ebaca2b920ae514e949c54a
Reviewed-by: David Schulz <david.schulz@qt.io>
This could happen, e.g. with this message order:
>>> updateTranslationUnitsForEditor()
add job<1>
run job<1>
>>> updateVisibleTranslationUnits(Utf8String(), {})
>>> updateVisibleTranslationUnits(path, {path})
add job<2>
finish job<1>
run job<2> -- Ops, nothing is changed but job<2> is started
This led to an outdated translation unit (e.g. wrong highlighting).
Now JobQueue checks for duplicates in the queue and checks all the
currently running jobs.
Change-Id: I05843fddcbd21ce0489681c283227c0027ded428
Reviewed-by: David Schulz <david.schulz@qt.io>
Parsing happens rotationally on the translation units.
The recently parsed translation unit is used for completion jobs while
the older version is used for parse jobs.
Advantages:
A1. A completion job cannot be blocked anymore by currently running
parse job.
A2. Faster triggering of parse jobs. A reparse was triggered about
1650ms after the last keystroke. This is down to 500ms now since we
do not have a blocking translation unit for the completion anymore.
Disadvantages:
D1. Memory consumption is doubled for an edited document.
This could be addressed by suspending the second translation unit
after some time of inactivity.
D2. Setup of the supportive translation unit takes some time.
Change-Id: I958c883c01f274530f5482c788c15cd38d6f4c3e
Reviewed-by: David Schulz <david.schulz@qt.io>
This enables a job per translation unit instead of per document.
This does not change any behavior yet.
Change-Id: Iafb8dab5da32b53dbb3010c16241bf89cbb81b38
Reviewed-by: David Schulz <david.schulz@qt.io>
Speed ups the typical use cases that can profit from this:
* Change a header file and switch then to source file
* Open documents one after the other (Follow Symbol)
* Change documents visible in splits (e.g. by refactoring action)
* Restore a session with multiple splits
Fixes the test ClangIpcServer.GetCodeCompletionDependingOnArgumets.
Change-Id: Ia575bd59780df14146dfc091a4d48794e4a0543d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>