Part of preparing to re-use QC's TreeModel/TreeItem for
TestTreeModel/TestTreeItem.
Change-Id: I8699405c3dcad88df67171af2d542bc8e3fd2fc0
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Part of preparing to re-use QC's TreeModel/TreeItem for
TestTreeModel/TestTreeItem.
Change-Id: Ieab26e9061790dd4c3d8dc64ce292727a17977f7
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
This enables displaying data tags for data functions inside the
test tree. Clicking on the data tag opens the editor at the location
the respective QTest::newRow() call is done.
Change-Id: Ia91bf87437c2608a05bae88ed715711217685fdf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Helps to get more information when something goes wrong.
Can be enabled by setting QT_LOGGING_RULES to
qtc.autotest.testcodeparser.debug=true
Change-Id: Ic168029912f8af509d6a822440658225c7f04eab
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
If postponing a full parse unset an already postponed partial parse
otherwise we could run into the Q_ASSERT statement inside
onPartialParsingFinished().
Change-Id: Iee197f1e16496ea87975d5ead0e43953353ab9a7
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This removes the hard dependency on QmakeProjectManager.
Furthermore now unneeded code is removed and some parts
of the parsing are slightly modified to support other
project types than qmake based projects.
Change-Id: I1c23056d5a444ddea857e10fdb71264eb6ecc269
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Since d43a36c816 the code parser could
have been internally triggered already while still evaluating the
project. This made the parser trigger a parsingFinished() already for
a parse where not the full project had been available inside the
code model which made the plugin unit test fail.
Change-Id: I6cc787c24205cb82c6c2636f79bd0acc5c778c64
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...and enable/disable respective menu items accordingly.
Now it should be impossible to trigger more than one parse
at a time or setting a state and invalidating a state with
higher priority.
Change-Id: I0bcbeca6626209918e0a74b0bd2722583fc47bb3
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...especially state transitions that may happen while project files
are evaluated or source files are parsed.
Change-Id: Iceef38500b6d6a4deb430738e5e960077f8eb39a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
While parsing test code it might happen that the user closes
all related widgets and so the parser falls into the state Disabled.
This was unexpected and did print a warning.
Now this case is somewhat expected and won't print a warning anymore.
Change-Id: I0082bdc31f6ed351cf1dbd7b34da2f5672aee3dd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
...this was wrong especially when closing (the last) open project
that contained unnamed quick tests.
Change-Id: I6d030b6219d9f397a6ffb51a985ef4147eebec8a
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
No need to have another member variable for almost the same
functionality. Consolidated where necessary.
Change-Id: Iefaa410fea527f88b18b406199a449fc9e4d0533
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Instead of always parsing again when re-enabling parser do it only
if there are changes of the current project.
If the current project has not changed since last parsing just rely
on the cached information.
Change-Id: I7681318132f37172730648604ddbecf1cd37d177
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
...to avoid blocking the ui thread. Parsing will now performed
in a separate thread, except for small changes where this would
create too much overhead.
Change-Id: I1db441594f1684f969bb86c9423c0fb0bcb1a53a
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
The new approach enables the parser as soon the Tests navigation
widget or the Tests results pane is visible.
If none is displayed parsing will be disabled.
This additionally fixes an issue of not parsing a project
when having a project opened already before triggering the
first Tests navigation widget to become visible.
Change-Id: I7163268d405e07e85814097d65ff34790a98a3d1
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
Handling of parsing has slightly changed. The parser now uses simple
states to be capable of postponing triggered parses if there is already
a parsing in progress. Furthermore the parser now waits for the current
project to be completely scanned.
Change-Id: I6d4968d28194ba8d23d3a0ee6ab454d81a549e67
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
...for code split up into header and source.
Change-Id: I8f1bf01e6ff6f88afc1e054318cd384b5f231eb6
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
Additionally some minor refactorings to increase readability.
Change-Id: I0be120fcedcf31dbb0116d84f0d3c23cf95e7d91
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
This fixes two different crashes when TestCodeParser tried
to access m_currentProject, but the object this pointer was
referencing had been deleted already.
Change-Id: Ie59e027394e613a8ef1e4f32f97abed6e8cb007a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>