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>
A TranslationUnit is owned by TranslationUnits now. TranslationUnits
allows to add another TranslationUnit and to update/query the recently
and previously parsed translation unit.
This does not change any behavior yet.
Change-Id: I8a2f0cc05d3e51bf739dd5d7c4da14b54147f3ab
Reviewed-by: David Schulz <david.schulz@qt.io>
...in preparation for follow-up changes. This will enable e.g. a timer
per document.
This does not change any behavior yet.
Change-Id: Ic1dc06de602373c666d47ce7a95ab99e56d389d5
Reviewed-by: David Schulz <david.schulz@qt.io>
jom's repository can be cloned quicker than Squish can cancel the
procedure, making the test instable. Cloning installer-framework
takes a couple of seconds longer.
Change-Id: I032a4bf60cfd3b070e4c311fbd1dae5b81e8fcd1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... and make the auto test infrastructure able to handle
a test. To pass the test, some Nim compiler must be
accessible.
Change-Id: I707aa72c0f3a2ea35c7131cba490cafb41617f6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Whatever the problem was seems to be fixed by now.
Change-Id: I0990614f5ed5b4f61f0e7d1017603fc317ada6d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Start displaying QV4::Value again for numeric values
and QJSValue for ints, doubles and strings.
Change-Id: I18ce226c21168087ce280cb05aa0e250bd3187d9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Lowers the barrier for other debugger backends.
Change-Id: I09e0ad09548b6b4220175245cc0d845ac5aa29d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
The model now supports dynamic node properties. e.g.:
Item {
property Item item: Item {
}
}
In this case Property::dynamicpropertyType() is Item and
Property::isDynamic() is true.
To create such a property I added:
NodeProperty::setDynamicTypeNameAndsetModelNode().
It is not supported to reparent nodes in an out of
dynamic node properties. The model throws an exception in this case.
This is currently not required on the application level and not
supported by the rewriter.
Change-Id: Ie05325663c481d8583dc45bee38b559c190fbb30
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If we use paths with spaces we cannot split them anymore so we have to
handle unix and windows differently.
Change-Id: Ibfc8c51cfe2ecd68e913ad84e0e1269eb7eeda02
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Extract common stuff into the base class ClangException
* Remove unused exceptions TranslationUnitParseErrorException and
TranslationUnitReparseErrorException
* Do not send error messages to the Qt Creator side. The messages were
only generated when the backend crashed and while it was not yet fully
re-initialized (e.g. do code completion right after crash where the
document was not yet registered at the backend).
Change-Id: I91d98d5ef681ad487f7a2fd66f78fa7cd1e958df
Reviewed-by: David Schulz <david.schulz@qt.io>
This introduces a dumper types abstraction layer with classes
Dumper.{Value,Type,Field} wrapping either gdb.{Value,Type,Field}
or lldb.{SBValue,SBType,SBField} and uses it to move
to more direct memory accesses in the dumper implementation.
This way we can use duck typing for artificial intermediate
objects eliminating the need for {gdb.Value,lldb.SBValue}.cast()
in some case which are flaky in general and typically not
available in release builds.
As consequence QRegion and QVariant dumper work without debug
info now.
Change-Id: Iea2411175ef67f2bf651ee7eaade9879ed5ceba1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The "TranslationUnit parts" moved already to TranslationUnitCore.
Change-Id: I2bea7847e2b3e84fbfacc3d2dc43f180873349ac
Reviewed-by: David Schulz <david.schulz@qt.io>
Do not require directly passing the enclosing template.
Change-Id: Ie03bc58338fe003677a5f5311d86d70f499373ee
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
We don't want to disable RTTI in unittest so we require to compile them
with RTTI. You can disable yourself RTTI if you don't want them for some
reasons.
Change-Id: I76d05a36442305f379ce3d88b3f6ed4372127002
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
With up to 43 characters it's more probable to
not have a dirseparator in the generated string.
Change-Id: Ib59fc55eb0b78c9796e19006c057571d7d494e40
Reviewed-by: Christian Stenger <christian.stenger@qt.io>