Adding API for that to the parallel map/reduce functions
Change-Id: Ic7987d899c124dcb04c1ca110b09fc97576873fe
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Avoid unintentional re-enabling of the code parser.
Handling of the enabled state broke several times before,
therefore separate it from other states of the parser to
avoid breaking it again when not taking enough care while
refactoring or adding features related to states.
Change-Id: If1eb0dd649225f10bfc3bf06f09851649da75983
Reviewed-by: David Schulz <david.schulz@qt.io>
Avoid using global thread pool, use internally provided functions
instead.
Change-Id: Id8d3c72c45d85d4806e3692ef3039c31a0eae7b9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Initial parsing for tests when opening bigger projects was too
slow. Try to let the parsing process on more than one file at
a time to speed up the whole process.
Project before now
qtbase ~11min ~4min
qtcreator ~2min ~40s
Values above may vary depending on the underlying hardware.
Change-Id: I77eeb189c82c58fce84ffbac67143ec7fa0adcae
Reviewed-by: David Schulz <david.schulz@qt.io>
Sometimes the progress indicator did not stop its animation
when parsing for tests was canceled.
Change-Id: I0e4896f2b391ce6690d079fb8b33972cc5fb07f3
Reviewed-by: David Schulz <david.schulz@qt.io>
If parsing the project is not finished we get an empty list of
files to be scanned.
Just trigger another full scan for such a case.
Change-Id: I84b275f76bc98c8f0ef544fc27d30ebd6f8b43d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Avoid fetching all files for the startup project again and again
while code model is indexing files. The indexing emits documentUpdated
signals for all (relevant) processed files.
If code model is indexing we perform a full parse anyhow after the
indexing has finished.
Change-Id: Ibfdb47f403da19d5bab3eb2295447ad451fca2b5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If tasks are running while shutting down we might end up in a crash,
so cancel all tasks and handle possible invalid accesses of the
current running processing.
Change-Id: I69f7cac5f44390e322fa301af6d6794270c95c2a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
qbs files are kind of qml documents which end up inside the
QmlJSModelManager. Ignore them by default.
Change-Id: I7136dee80a5f5bfc1b5262daeb00890df28e3f4b
Reviewed-by: David Schulz <david.schulz@qt.io>
Avoid displaying tests from other projects of the same session
which have been indexed but do not belong to the current
startup project.
Change-Id: I6e0fb62cc97898ef3853ec61580dd2deb5ac64e5
Reviewed-by: David Schulz <david.schulz@qt.io>
Instead fetch it once before starting asynchronous processing and
accept that current state of the WorkingCopy might be not completely
up to date. This avoids a crash that might happen when the code model
tries to update the WorkingCopy while the test code parser fetches
information of the WorkingCopy.
Change-Id: I2a893bc8814090361305657ed3c3d772c7bf07d5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Mainly a preparation for enabling/disabling test frame works.
Change-Id: I0bbea7e055a607517ef8193587c229cadf0de027
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Preparation for introducing test frameworks.
Change-Id: Iefaa4ca9dd9af665444556afa9c6e326041cfd0f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...into files and respective sub folders.
Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This is also necessary for a uniform handling while adding or
updating test tree items, which in turn makes it possible to
separate model and items once more.
Change-Id: I84ff558d23490c8734b22062f00e03e8c06d6720
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...to allow different approaches for different test frameworks.
Change-Id: I16f101fb3f702a0db00cffe33e0d83cd4ea28c99
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This is necessary later on as we will need different sub-classes of
TestParseResult to support different test frameworks.
This avoids the necessarity to put all information inside a single
object even if it is not used.
Change-Id: I39c74ba06b9337608ece8b113b0993c0934b24b9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Use function objects to apply directly during a depth-first
walk of the tree instead of faking a flat container of tree
nodes. Less code, and allows even some non-const operations.
Change-Id: I804ab11df358fe937b40809cbcb772e6f3ff8dc5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...when having split source and headers and defining test data functions
inside the source file.
If we just reparse a header file (e.g. when opening the respective file
inside the editor) we have no explicit information where the definition
of the functions is. This lead to not finding the information necessary
for displaying data tags and throwing away old information as they have
been marked for removal.
Change-Id: Ieb8ed9f7c758fe2c793e60ca2c30b4025106363b
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
It could happen that Qml related docs have not been added to the
QmlJSModelManager when trying to use them on our side.
Just ignore them when this happens as they will be added manually
as they will get added automatically when parsing the respective
main cpp file.
Change-Id: I25c4b6d9159ad4ff8def3148c2a04356380fbd27
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This is preparation for a consistent interface to be later
able to provide a way to support other frameworks more easily.
Change-Id: I6d83060364121eb3d11f7e0b5b259b6eeb1564b4
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
If the document gets updated while typing we can get different
results when fetching the content and using positions inside the
content which might have updated milliseconds later.
Beside fetching only once ensure valid parse results by adding an
additional check for the used visitor.
Change-Id: Id1ba4a139a4dc497be0fbb5cf1f81004f3f8676c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Replace several occurrences of QMap with QHash as we often do
not care about the order and use iterators instead of fetching
keys or values to iterate over them.
Change-Id: I5061a7e7e60fe259ac2aa31915f338a373e278d3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...at least for C++ based auto tests.
Qt Quick Tests are out of scope for this issue as this
would need too much additional tweaking for several parts
of the plugin.
Task-number: QTCREATORBUG-15813
Change-Id: I440a8b1f8e6deb9e6acf2e82d0831fb002c10390
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This patch enables execution of disabled tests, repetition of
test runs and shuffling of test sets.
Change-Id: I3668afde5766d18acdf1afb7edd913655b13a76c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
...and let specialized items handle its specialization by itself.
Change-Id: I988ce3c610bef68933b9102bb39ae4723add3a99
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
If a container is given to mapReduce, it takes the responsibility to
report progress information for the whole operation. If the map function
reports its own progress, that is taken into account for the overall
progress.
The (so far only unordered) Utils::map operation can be used to replace
MultiTask, by passing a member function of the items in the container as
a map function.
Change-Id: I18ca38a6ad2899d73f590bfe59bf2e6eb2f1a57a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Copying of the results is quite costly, so reduce this to a minimum.
Change-Id: I8db3bcd72c34ddd0bdc622ec3f2fd538c9679955
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.
Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>