Root items that have a partially checked state would keep the state when
switching projects until manually modified or if new items would be
added on a next parse. Reset them to checked state instead.
Change-Id: Id543edd7694abc6fcec3b8d028dce2ee82213517
Reviewed-by: David Schulz <david.schulz@qt.io>
This allows (de)selecting of all test cases of a specific test
framework.
Change-Id: I21357d3dbcfce73387f157b1b40686f437fa260b
Reviewed-by: David Schulz <david.schulz@qt.io>
It is a bad idea to remove child items while iterating over them.
Introduced a while ago, but forgotten to fix in f00a113e.
Change-Id: I8d335cec34c2e6a9e7dff99d10c68066ffa8933d
Reviewed-by: David Schulz <david.schulz@qt.io>
* remove unnecessary QLatin1String where possible
* foreach
* nullptr
* bad naming of static members
Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90
Reviewed-by: David Schulz <david.schulz@qt.io>
Introduced with latest changes to TreeItem.
It is a bad idea to remove child items while iterating over them.
Change-Id: I6941f4728cf93e47b3ef6405bd1304112946c481
Reviewed-by: hjk <hjk@qt.io>
... and use this to reduce the number of explicit uses of m_children.
Despite of being shorter code by itself it is a step towards having
an explicit LeafItem object that doesn't explicitly store a(n empty)
vector of child nodes.
Change-Id: If8db85e2f1134dd1578a78d31235bf57a28f863a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Introducing support for inheritance broke some old functionality
which in fact was just over engineered.
Remove additional code which will be automatically handled and does
not need to get handled by special logic which could be now wrong.
Change-Id: I05a063c41dc0f8f644d0807fc5497de9c4461246
Reviewed-by: David Schulz <david.schulz@qt.io>
Remove the 'Always parse' setting and respective special handling.
This simplifies the handling of parsing for tests and removes
strange special handling that was introduced in earlier versions
and led more to confusion on the user side.
Change-Id: Ia4d122ed448244f3cb3876dda9930864afde9c28
Reviewed-by: David Schulz <david.schulz@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>
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.
BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.
Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
TestTreeModel::testCaseNamesForFiles() is a helper that is currently
needed only for handling the Qt test framework.
Move it down into Qt framework's helper class and make it static.
Change-Id: I03c377a76402593584870cbbdaa4621d19278443
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Mainly a preparation for enabling/disabling test frame works.
Change-Id: I0bbea7e055a607517ef8193587c229cadf0de027
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...for determining from which root node test cases names are needed.
Another preparation for introducing test frameworks.
Change-Id: I02910f3e4736d9be6e6822eea7863fc62252d4db
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Preparation for introducing test frameworks.
Change-Id: Iefaa4ca9dd9af665444556afa9c6e326041cfd0f
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
AutoTest* is too generic within the context where it is used.
This patch renames respective classes, members and string occurrences.
Change-Id: Ie413e4a344ddaf7892ecf248ba486defb4b9e3ef
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>
Another preparation for having a consistent interface later on.
Change-Id: I573e45101016048de916f4d321b326a24efbe4ee
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Items that will be marked for possible removal on first level
forgot to mark their childrens which led to keeping them when
sweeping although they should get removed if they were not
found again.
Change-Id: Ib364823ee60d31370331b090c776799ca5f663bf
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
The signal used to be emitted only on reset or when tests are actually removed during sweep phase:
thus the 'run tests' button in test panel stayed disabled if the panel was opened while tests were
scanned.
Change-Id: I274c9d03f1e1140c8aa375f92465c5a0c866cd62
Reviewed-by: Christian Stenger <christian.stenger@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>
Run buttons of the results pane might stay disabled after a
parse if no items would be swept.
Change-Id: I3df800ec0b42fa7de2b010a911922427da51df3c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Since parsing and updating the tree model has been changed the
respective tests became flaky.
Change-Id: I82fcde51493bc86e2315018b21e9bacd8e8409a9
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
...and let specialized items handle its specialization by itself.
Change-Id: I988ce3c610bef68933b9102bb39ae4723add3a99
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
For Quick Test and Google Test tree items the referencing file is
always the same as the main file, so remove this duplication and
use the referencing file as this information is mandatory.
Change-Id: Ib9ddb1d546ed785a4f1aad133a63138c929379c2
Reviewed-by: David Schulz <david.schulz@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>
...otherwise update existing. This reduces the number of items
that would get created or destroyed especially while modifying
code or just open/close test related documents.
Change-Id: Ia6a03ec33550c8c28e5120422e0f68fa428c1020
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Test parser is normally disabled as long neither test tree nor results
pane is opened. The new setting allows the user to enable the parser
without the need to have one of these widgets opened.
Task-number: QTCREATORBUG-15669
Change-Id: I354e1a3cb91eeca2302f2344fd443c81c4b15406
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>