Commit Graph

29 Commits

Author SHA1 Message Date
Christian Stenger
ba99a7f921 AutoTest: Fix crash
Remove the unneeded stunt when clearing cache which only led
to crashes.

Fixes: QTCREATORBUG-28269
Change-Id: I908bcbee0f49369a589862cd8fbd3253444246c3
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-10-27 06:54:52 +00:00
Eike Ziller
4bbbee1e63 Merge remote-tracking branch 'origin/8.0' into 9.0
Change-Id: Ib2e350805a3043f7b84da960978f09674dc70694
2022-10-10 11:35:05 +02:00
Christian Stenger
1462258939 AutoTest: Avoid crash
Do not emit sizeHintChanged() on a QModelIndex that is no more
part of the model.

Fixes: QTCREATORBUG-28269
Change-Id: I1fa1733961eff8b427a9510243d304565cefe380
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-10-10 08:59:17 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
Eike Ziller
94d352ab28 Merge remote-tracking branch 'origin/5.0'
Conflicts:
	src/plugins/autotest/testresultdelegate.cpp

Change-Id: If172206f231fc2a9f4a672cd2e6eaeaea4988c96
2021-08-18 16:14:24 +02:00
Christian Stenger
0d23a3b886 AutoTest: Handle resizing appropriate
When the user resizes QC and has a test result selected which
contains multiple lines these lines will be re-evaluated
and may now end up in having more or less lines than before.
We need to inform the UI that this caused a change of the
needed size otherwise we end up in omitting lines or adding
empty lines.

Task-number: QTCREATORBUG-26122
Change-Id: I91b0271975f8f0fff128ef7cf6c74947c0162ea9
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-18 11:54:07 +00:00
Christian Stenger
017416e327 AutoTest: Take indentation of sub items into account
Otherwise we might end up losing final lines depending on
the output and the need of wrapping the text.

Fixes: QTCREATORBUG-26122
Change-Id: I724bacfa8be37a056f56a67fce4b724d367fda4a
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-18 11:53:14 +00:00
Petar Perisin
fe4c046243 AutoTest: Add ability to limit test description
Test description is made of entire test output,
and if it is very big it can heavily limit
test output pane usability.
This commit adds option to limit description size.

Change-Id: I5aae5e460f1939cd94a84ab1ca79f413d66d8bf2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-08-10 11:17:27 +00:00
Christian Stenger
5525f2b112 AutoTest: Use Utils::FilePath for files and directories
Still some missing bits as some QString members had different meanings
depending on their context.

Change-Id: Ib48eab54498974a26bbd5123cbffeefee5f7e79c
Reviewed-by: hjk <hjk@qt.io>
2021-05-27 12:24:05 +00:00
Christian Stenger
ac14a1e038 AutoTest: Clean up header mess
Better decoupling and reduced binary size.

Change-Id: I4f6239979d9d7dae4ad92f19ec8420be38372c07
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-09 08:24:01 +00:00
Christian Stenger
cd1a848e16 AutoTest: Fix wrong caching of text layout
The text layout must get recalculated also when the width
of the underlying model index has changed.

Fixes: QTCREATORBUG-24236
Change-Id: I4ded56832c765320b6845cf35ad61453875dad50
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-07-10 05:06:47 +00:00
Christian Stenger
0576e419e3 AutoTest: Redo evaluation of result summary items
By moving this functionality completely into the tree item
it is possible to eliminate superfluous enum values that
basically represented the same item but in different states.

Change-Id: I2e6b6462bbaae51bdf6822fde198aea36f951c7f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-29 13:06:31 +00:00
Christian Stenger
cbab457cf4 AutoTest: Refactor TestResult
* use enum class
* remove superfluous enum value
* remove superfluous subclass
* remove superfluous constructors
* simplify handling

Change-Id: Iecf11e62eb842c9d455d9238939244496f6b66f4
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-26 12:19:05 +00:00
Christian Stenger
1d894c0f7a AutoTest: Code cosmetics
* use nullptr
* override
* remove old style casts
* fix most of the code model warnings

Change-Id: Ia08e846f9326ae28ca7e7d66748e25a8b817b9b1
Reviewed-by: Xing Xiong
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-07-20 08:34:48 +00:00
Eike Ziller
46ad21a796 Merge "Merge remote-tracking branch 'origin/4.6'" 2018-02-01 10:13:42 +00:00
Christian Stenger
0bd6f712f0 AutoTest: Access plugin singleton through static functions
It's the more common pattern nowadays, and cheaper.

Change-Id: If6217b2a820fbfa6f088fd9349225f5f8488f593
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-02-01 09:51:54 +00:00
Christian Stenger
f3c8ab52fa AutoTest: Avoid unnecessary local object
Change-Id: I9794a35ce5f983114769f3a14ab970f4e822471f
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-26 11:43:35 +00:00
Alessandro Portale
e180244e85 AutoTest: HighDPI adjustments for TestResultDelegate
- Remove the gap between background rect and division line.
- Consider the QWindow when drawing the icon

Change-Id: Ie10f862f556049ec1bce78a6abe8f6170bd3abaf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-10-20 17:56:10 +00:00
Christian Stenger
96da2973c3 AutoTest: Clear cached information before running
We cache the last processed model index as well as the used
font. In some cases the cached information interfered with
new information and ended up in an ugly painting issue
where old information partially got repainted instead of
using the new. Clear cached information when starting a new
run to avoid this.

Change-Id: Ibb01e5e3bdd7b542325b5867d37c677d31a14aae
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-10-13 12:08:18 +00:00
Christian Stenger
b4ca318383 AutoTest: Improve test results summary items display
Instead of letting warn prevail over pass and fail over
warn just add warn as additional visual marker at the icons
and keep the original test result.

Task-number: QTCREATORBUG-18311
Change-Id: Ia67288fa84598b02c20fc1019799b1bb9282d63e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-24 11:05:21 +00:00
Christian Stenger
085ac718d5 AutoTest: Replace obsolete function
Change-Id: I633a554472f0327160fcbdd9be78798c41014a51
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-17 08:01:28 +00:00
Christian Stenger
183cd8ce99 AutoTest: Use result type string also for summary items
But use a grey'ish color to explicitly mark them as summary
items as they are no real test results.

Change-Id: I7e682a7753e8467e6ec65ac09fb27a7b798d765f
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-08 05:39:45 +00:00
Christian Stenger
cdd94cbb02 AutoTest: Make results tree a real tree
Provide a way to control how the results tree will be
generated for the respective test framework and use
this information to construct a real tree.
Basically this changes the layout of Qt test results,
but keeps the former layout of Google test results.

Task-number: QTCREATORBUG-17104
Change-Id: I7fca4d8e365bfebcca4cf7855cf6a882e5379143
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-12-09 11:33:27 +00:00
Christian Stenger
492c0cd004 AutoTest: Make separating line of test results slightly darker
Especially for darker themes the brighter color was quite too
aggressive.

Change-Id: Ib37e7524c035e300768159e0950e593036c7f6a4
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-10-26 10:00:28 +00:00
Christian Stenger
b0bf07c64a AutoTest: Modernize code a bit
Change-Id: Ie56f6e5cb8a4f1962bd8df5e57214911ae609921
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-09-29 12:27:14 +00:00
Christian Stenger
3b83b8b989 AutoTest: Fix compile
Change-Id: I5d82491f77459227feaa46475e796592b6e3af89
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-05-12 13:58:24 +00:00
Christian Stenger
87a6f003e9 AutoTest: Split off TestResult...
...to avoid dragging around members that are not used in sub-classes.

Change-Id: I3e30b403491b1ae9219a0b461c3034cb854701a6
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-05-12 13:49:00 +00:00
Friedemann Kleint
537a5c0067 Autotest: Use QStyleOptionViewItem instead of QStyleOptionViewItemV4.
Fixes warnings:
warning: 'QStyleOptionViewItemV4' is deprecated (declared at ../../../../qt-dev/qtbase/include/QtWidgets/../../src/widgets/styles/qstyleoption.h:390) [-Wdeprecated-declarations]

Change-Id: I41683dc7f449b7e738a6e058b8c0a1e051da6c50
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-02-03 12:48:59 +00:00
Christian Stenger
15b4e6fc91 Delete unneeded and prepare directory structure...
...to get plugin's repository more easily integrated
into QC's repository.

Change-Id: I10243bb4283623ae951e799feacaa15915678e04
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-22 14:07:19 +00:00