Commit Graph

69 Commits

Author SHA1 Message Date
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.

Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 13:47:53 +00:00
Eike Ziller
04e50438eb Utils: Remove Utils::optional
Since we are now requiring macOS 10.14 we can remove our local
implementation of optional and use std::optional for macOS too.

Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2022-09-01 06:58:04 +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
hjk
960e99ecb1 Autotest: Convert to Tr::tr
Change-Id: Ifd4b6ace78d02804ec3b3c1d60c5418081cad6c4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-01 12:16:41 +00:00
Christian Stenger
c141b0d8f9 AutoTest: Support some ctest settings
Add some useful settings for ctest based testing. Adapt output
parser accordingly to get at least relevant output and display
significant information inside the visual display.
Current implementation loses or mixes some information when
running jobs in parallel.
Complete output is still available inside the text display.

Fixes: QTCREATORBUG-26029
Change-Id: Id040f83900a6cfd89f5c2aff987278a297aa14c4
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-09-21 04:31:34 +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
Alessandro Portale
72d91dc94a Use qAsConst with non-const Qt containers in range-loops
... in various places

Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-17 14:43:29 +00:00
Jarek Kobus
cf010911f7 Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container
[clazy-container-anti-pattern]

Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-14 12:35:47 +00:00
Christian Stenger
239a59c596 AutoTest: Introduce ITestConfiguration
Preparation for an additional simpler test configuration
which needs to have the same common base.

Change-Id: I1800ed5d7301f1aea99eba6ef588a204697bd569
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-16 08:10:04 +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
Eike Ziller
5ab8cc61fc Merge remote-tracking branch 'origin/4.13' into 4.14
Change-Id: Ia20a937786be651a5fe9daefb856f7779905ef68
2020-10-08 09:46:09 +02:00
Christian Stenger
ac0ae2f1eb AutoTest: Fix summary part III
Amends 479f6c8.

Change-Id: I3bd7a789eef8d53610f87ccaafa43c921ff1e23f
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-10-07 08:44:55 +00:00
Eike Ziller
8b031c8c05 Merge remote-tracking branch 'origin/4.13' into master
Change-Id: I3f2a6c553819e992da7e9f538dc44b95b482359e
2020-10-02 10:47:07 +02:00
Christian Stenger
479f6c8129 AutoTest: Fix handling of summary
Avoid overwriting already gathered results and handle
special cases like parameterized boost tests correctly.
Beside this take into account that fatals on the boost
side are treated as failures when printing the summary.
Amends 6ab7013579.

Change-Id: I3815f79cbb4d16fd7b3d286617d79b30e94ccdd8
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-09-24 11:39:17 +00:00
Christian Stenger
5f22126a79 AutoTest: Support gathering failed tests
Mark test tree items as failed for the last run
to be able to re-run them in an easier way.

Change-Id: I7ea3dcd16e5a02797d41f13e02b2fa95b857cf5e
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-09-16 06:53:54 +00:00
Christian Stenger
ec65d43b65 AutoTest: Fix auto expansion of test results
We may add items that have sub-items already, so apply
the expansion to them as well if necessary.

Change-Id: Ibff4433c5a7c0a110461e46998cd39864f4ec929
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-07-16 04:25:53 +00:00
Alessandro Portale
bb89b80097 AutoTest: performance-for-range-copy
Change-Id: I60e79aec1fe2813867d8ff46cec7d39b848d0020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-12 07:01:10 +00:00
Christian Stenger
e87088f3e9 AutoTest: Add error as test result type
Task-number: QTCREATORBUG-23354
Change-Id: Iaeabfc6eedf18c52dc9bdc59833e213a09458617
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-12-16 06:27:48 +00:00
Christian Stenger
d96c2e5d16 AutoTest: Fix updating parent
Skip had been added mistakenly to the insignificant
results.
Do not handle Skip as an insignificant result as
it will be correctly handled while updating the
result.

Fixes: QTCREATORBUG-22545
Change-Id: I3c09416934b1c747dd8160635b5bfaa46c31f5a4
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-06-12 10:27:36 +00:00
Christian Stenger
12038dd012 AutoTest: Enhance reporting passes and fails
Depending on the report and log level of Boost UTF
the number of test passes and fails might be wrong.
Circumvent by providing a way to report a summary.

Change-Id: I6d2cb7674550f10a0263e08d21cce42569f3d7a8
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-06-07 06:39:52 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02: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
a182478d94 AutoTest: Fix uncheck all filter
Change-Id: I0fe6b95b0aebc723f57546e796650cea4d3fd8d4
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-23 06:38:07 +00:00
Christian Stenger
19f2da8048 AutoTest: Redo reporting of disabled tests
Provide a proper way of reporting disabled tests instead
of the hacky one.

Change-Id: Id3a775d57ac20c9db8ad0f504cb708021117aa2f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-04-03 08:11:57 +00:00
Eike Ziller
0619de8681 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/tools/clangpchmanagerbackend/source/taskscheduler.h

Change-Id: I518adaf647df412887c2a372416634359f09ad2a
2019-03-05 10:22:45 +01:00
Christian Stenger
10a04ce40d AutoTest: Fix updating of parent
Amends d886285ff0.

Fixes: QTCREATORBUG-22028
Change-Id: Ief97520a7db9bc90ed43a0b463008fc57ced0cea
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-03-04 11:36:28 +00:00
Friedemann Kleint
ec6b38dea0 Fix Qt 5.13 deprecation warning about QFontMetrics::width()
Replace by QFontMetrics::horizontalAdvance(), fixing:
warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated:
 Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations]

Change-Id: I9991ffefe6e87e872dc35ba291d562e06b28ca64
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-02-15 15:12:02 +00:00
Christian Stenger
7ba74c2ba4 AutoTest: Use TypedTreeItem for TestResultItem
Simplifies code and reduces (visible) static_casts on
the auto test plugin's side.

Change-Id: I31ae3e4f1a32d3e74527ccb36080944848f3b1fa
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-08 05:39:25 +00:00
Christian Stenger
1a58a30685 AutoTest: Allow grouping of results by application
Add an option to group test results by the application
that contains the test cases.

Fixes: QTCREATORBUG-21740
Change-Id: If4e5c8118cd5dd81b1b75891b4eca85b08e76848
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-05 08:57:35 +00:00
Eike Ziller
88b29792cb Merge remote-tracking branch 'origin/4.8' into 4.9
Conflicts:
	src/plugins/android/androidrunnerworker.cpp
	src/plugins/android/androidrunnerworker.h

Change-Id: I52b9117c8a57dc4a34cfc09d1ae9bc76e0752bfc
2019-02-04 15:21:55 +01:00
Christian Stenger
d886285ff0 AutoTest: Fix handling of empty tests
If an item of type MessageCaseStart is going to be
updated it might end up in still getting no icon
if none of its children is enforcing a change.

Change-Id: I7ec6d114c547189a02744f064d4c04cdf31a03d7
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-02-01 07:16:41 +00:00
Christian Stenger
0af0f58a60 AutoTest: Support blacklisted XPass and XFail
Blacklisted XPass and blacklisted XFail have been added to
QTest. Add the respective handling to the plugin.

Change-Id: I96b85fa045bdf51abd8e295b075f9ab1ed95eb66
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-30 06:46:35 +00:00
Christian Stenger
7d779bad7c AutoTest: Fix icons for results pane
Summary items with type pass or fail including warnings
had wrong or no icon at all.

Change-Id: I2ce3c7c8f0c9c93e80809281ede0aba17fc59e82
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-10-01 07:25:20 +00:00
Orgad Shaneh
12e253df9d AutoTest: Remove usages of deprecated QModelIndex::child
Change-Id: I8b310a54d6c1a044c94edac8fd67dfa8b2fcfb91
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-09-21 04:48:27 +00:00
Sergey Morozov
db85693690 AutoTest: Create tree item for each failure
Introduce special location item for this purpose.

Task-number: QTCREATORBUG-20967
Change-Id: Icb6c6ec8ff9d2e4e8e3d13834427bae50d74bd2a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-29 16:57: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
Christian Stenger
ad8e67cea3 AutoTest: Code cosmetics
Change-Id: I49a73b83b1b6857c34913db8f7c6818cf7a1a129
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-06-19 07:40:09 +00:00
Christian Stenger
78bd3f9ec3 AutoTest: Rename results executable
Rename member to better reflect its meaning. It is used
as an identifier and might be something else than an
executable.

Change-Id: I082e3caaa3d94fcd7ab26ebc43bb0eb6da136d57
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-15 05:28:45 +00:00
Christian Stenger
e7a71672be AutoTest: Treat critical messages as warnings when filtering
Task-number: QTCREATORBUG-19795
Change-Id: Id314bd08af0e909fe717af6de836fc2aa451dea0
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-13 13:30:27 +00:00
Christian Stenger
e6f2d19b26 AutoTest: Handle qCritical similar to warning
If a test passes but produces qCritical() messages do
not display the test as failed, but as a pass with
warning instead.

Task-number: QTCREATORBUG-19795
Change-Id: Ied3f0ad38b96c87ea93f765db802ea0293f63544
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-02-13 12:54:40 +00:00
Christian Stenger
e4eb4c3d0f AutoTest: Correct updating of summary items
If we get no finish message for a test case or function
we did not update the result of the summary item.
This patch fixes this and also updates the respective
parents accordingly.

Change-Id: I98a8c69735f89d592f6152dbbc7a632e285c3a4d
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-10 06:06:50 +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
625129d29c AutoTest: Fix appending test results with the same name
If two test cases had the same name but came from a different
executable the results pane still might have shown any later one
(badly) cascaded inside the first one. Avoid this by providing
an additional unique information (the respective executable for
the test case)

Task-number: QTCREATORBUG-18502
Change-Id: Ib071e389758b6269a9a90cc4c4afbcf86ca583ac
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-07-24 11:05:08 +00:00
Christian Stenger
4edc715b1c AutoTest: Speed up finding parent items
We normally add new results to the last added
item, so processing the search for the parent
from bottom to top makes more sense and avoids
iterating over almost every item.

Change-Id: Iede08b9c0d4c80227d2e8fea9b002354f01d5b35
Reviewed-by: hjk <hjk@qt.io>
2017-06-30 11:36:44 +00:00
Tim Jenssen
3bc2ce1864 fix uint warning and use vector::reverse_iterator
Change-Id: I23b201dd3452c0c9581ec94928020838f0624573
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-06-01 09:43:18 +00:00
Christian Stenger
23398229e9 AutoTest: Modernize code
* remove unnecessary QLatin1String where possible
* foreach
* nullptr
* bad naming of static members

Change-Id: If0f7c6839be4d2efbfef6f7f0775d2034775bd90
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-17 08:01:36 +00:00
Christian Stenger
ae2c068e68 AutoTest: Fix handling of data tags in test results
Avoid adding test functions again and put further data tags
directly below the respective test function.

Change-Id: I29775b836cc4584358ee67b5f07744986c6a6591
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-02-17 08:01:15 +00:00
hjk
196dbbe0e7 Utils: Introduce TreeItem::{begin,end}
... 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>
2017-02-08 16:08:42 +00:00