Commit Graph

43 Commits

Author SHA1 Message Date
Christian Stenger
d87b4668dc Fix postponing when code model is parsed
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>
2015-08-17 08:33:13 +03:00
Christian Stenger
565712d84b Remove useless code
Introduced with 4fbc020ddc

Change-Id: I28b6b7ea0cfdcc670e83e1114c546d00231a7027
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-17 08:32:51 +03:00
Christian Stenger
7c06e4b768 Be more generic regarding supported project types
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>
2015-08-06 14:53:45 +03:00
Christian Stenger
4fbc020ddc Ensure we do not interfere with ourselves while parsing
Change-Id: I4e22e91273737321e7dbfa10e50b4ae1f4ee63f9
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-06 14:53:37 +03:00
Christian Stenger
8b4bdb6a00 Consolidate duplicate code
Change-Id: I0cae5df1b1f5a8ddab063dc37e1dcd0cb97701a0
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-06 14:47:27 +03:00
Christian Stenger
8f738836ea Move signal emission to where it belongs
Change-Id: I85dc5793887e3a26bc86fc6615aa3167054ae58a
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-05 08:15:44 +03:00
Christian Stenger
9e8df7d2b3 Rename member to better reflect its meaning
Change-Id: I50a1f0ff69f638fceae4887c64be52f7d5b92822
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-03 14:05:19 +03:00
Christian Stenger
8fd27bc3cf Remove useless currentProject() function
Change-Id: I63598256b27a310231935104e6f7beb5ffe0eed7
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-08-03 14:05:13 +03:00
Christian Stenger
c13c37f9f4 Fix plugin unit test
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>
2015-04-16 16:22:43 +03:00
Christian Stenger
b88bfbb55a Fix state handling of parser...
...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>
2015-04-16 16:22:21 +03:00
Christian Stenger
d43a36c816 Trigger parse when project parts have been updated
Change-Id: I8b81bd91671b3d855c617c63185baa2951a55e6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-04-09 08:33:01 +03:00
Christian Stenger
2182b2adbe Change ui string to avoid confused users
Change-Id: I431de718d01e454bb55216afd5d0ca792fa69677
Reviewed-by: Riitta-Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-04-08 13:41:51 +03:00
Christian Stenger
377408b1b0 Fix parser state handling...
...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>
2015-03-30 12:21:44 +03:00
Christian Stenger
2c1a0119bd Fix unexpected parser state when parsing finishes
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>
2015-03-09 13:01:54 +02:00
Christian Stenger
36a8265549 Move variable declaration into using block
Change-Id: Ibf5f5fd825b7beb2bb6b607c8b822b4dfeebfda5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-03-03 16:03:50 +02:00
Christian Stenger
535f1eec18 Fix removing unnamed quick tests...
...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>
2015-03-03 15:36:43 +02:00
Christian Stenger
690f15c102 Fix names of local variables
Change-Id: I853ad97ff54d28714263f1431838dbe8d71f2fe2
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-02-27 15:42:09 +02:00
Christian Stenger
6a3b43fef0 Fix camel-case of *postponed*
Change-Id: Ie00c35bceba3b772f68e2d9b665af8427a105433
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-02-27 15:28:06 +02:00
Christian Stenger
2b8d6c5fc4 Remove useless member
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>
2015-02-27 15:04:06 +02:00
Christian Stenger
9eb6167189 Improve handling of disabled parser and re-enabling parser
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>
2015-02-27 15:03:52 +02:00
Tobias Hunger
01eb2ad24f Compile fix: Add missing includes
Change-Id: Ie93829eb73888646fcfd76746cd74bd7c1b09924
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-02-26 17:56:32 +02:00
Christian Stenger
7f5db66596 Fix copyright headers
Change-Id: If02fedb7c191492ddfaf2eb34e74fcdb7a007c94
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-19 09:13:32 +02:00
Christian Stenger
0a7b2b76cb Display progress indicator on navigation view...
...if parsing takes longer.

Change-Id: Ib311c031ae0af72b2f923d93578099687d9af91a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-18 09:23:02 +02:00
Christian Stenger
b9a60137ad Clean up plugin
Change-Id: I695adb992f4d1f32f266f1628f2094e4bcc81485
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-17 10:44:35 +02:00
Christian Stenger
4caba7a3dd Perform parsing asynchronously...
...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>
2015-02-17 10:26:49 +02:00
Christian Stenger
223b43e9e0 Enable and disable parser on demand
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>
2015-02-17 10:26:39 +02:00
Christian Stenger
213a687f45 Rework parsing and provide unit test
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>
2015-02-17 10:26:28 +02:00
Christian Stenger
751d2e2bb1 Fix re-parsing of tests...
...for code split up into header and source.

Change-Id: I8f1bf01e6ff6f88afc1e054318cd384b5f231eb6
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 15:49:58 +02:00
Christian Stenger
2ce99680b2 Decouple code parser and model
Additionally some minor refactorings to increase readability.

Change-Id: I0be120fcedcf31dbb0116d84f0d3c23cf95e7d91
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 15:43:02 +02:00
Christian Stenger
2ece8b6181 Fix detection of tests on OSX
Change-Id: I662afadd17bd8b2f1fbc9269dc470430e871e582
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
2015-02-16 15:27:32 +02:00
Christian Stenger
ca4b66e8ad Refactor TestCodeParser
Change-Id: I5fdb6429e8509468b7a710414af250ea6464d92d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-02-05 08:25:11 +02:00
Christian Stenger
3629aa9044 Fetch current project always before accessing
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>
2015-01-28 15:29:23 +02:00
Tim Jenssen
e0616dc889 use variable instead of anonymous "false"
Change-Id: I4ca2f7d82e70306ffae50d5eea31357e9fcfd0aa
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-01-09 14:19:45 +02:00
Christian Stenger
d778fc5477 Post-pone parsing for test if CppModelManager is parsing
Change-Id: I7af93eb587e55f7d6e4ee14ed9808ceeb41ed8a3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2014-12-18 18:32:01 +02:00
Christian Stenger
0fc6d113d1 Update test tree when configuration changes
This takes especially configurations in account when subprojects
are enabled/disabled conditionally.
2014-12-04 13:52:16 +01:00
Christian Stenger
b0c4a9cc3b Improve support for Qt Quick Tests 2014-12-04 13:52:16 +01:00
Christian Stenger
9a644d1257 Support sorting of test tree
Additionally preparation of filtering has been done.
2014-12-04 13:52:16 +01:00
Christian Stenger
0357b0e98b Add basic support for Qt Quick Test 2014-12-04 13:52:16 +01:00
Christian Stenger
85efa2c3c9 Update internal cache / test tree only if necessary 2014-12-04 13:52:16 +01:00
Christian Stenger
8e4181c3af Use TestInfo as object instead of pointer
No need for having this more complicated than necessary.
2014-12-04 13:52:15 +01:00
Christian Stenger
345b4de47a Rework the parsing and fixing detection of changes
Additionally
* fixed some deletion of pointers
* const correctness
* small refactorings for readability
* better separation of responsibilities
2014-12-04 13:52:15 +01:00
Christian Stenger
44db2be195 Provide basic test runner and output pane 2014-12-04 13:52:15 +01:00
Christian Stenger
2f4139e5d3 Initial commit 2014-12-04 13:52:14 +01:00