Commit Graph

15 Commits

Author SHA1 Message Date
Fawzi Mohamed
fd89043de2 qmljs: (QString -> Utils::FilePath)++
convert more QString containing paths to Utils::FilePath

Change-Id: I1219d7d147993e48cfa641dc9bea72ab38c90f51
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-13 17:13:23 +00:00
Christian Stenger
354a0b17ab AutoTest: More filepathification
Change-Id: Ibb76f4332fa2e682709520cebe5e243dc3b70bb2
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-06-17 08:30:48 +00:00
Eike Ziller
cf2a651c3b Make QmlJS(Tools) build with Qt5 & Qt6
Port from QStringRef to QStringView

Change-Id: I472d16f20e40ca52b8e5d481850a6bd8a1a38f3b
Reviewed-by: hjk <hjk@qt.io>
2020-09-17 09:37:23 +00:00
Christian Stenger
cae7b16a90 AutoTest: Avoid possible nullptr access
Fixes a crash when loading qtdeclarative and parsing
for Qt Quick tests.

Fixes: QTCREATORBUG-23864
Change-Id: I0c88908f578e2dd92341a6fdd427aed5157bb94b
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Richard Weickelt <richard@weickelt.de>
2020-04-15 12:08:17 +00:00
Fawzi Mohamed
b09a48599e Update qmljs parser to Qt 5.15 parser
* parser side support for annotations, inline components, new UiVersion
  and all the things included in QT 5.15 parser
* SourceLocation moved from QmlJS:AST to QmlJS
* Visitors now need to handle throwRecursionDepthError
* BaseVisitor for visitors that want to override all visit

Task-number: QTCREATORBUG-23591
Change-Id: I682a30d0b08b6c929739fd0e339ef6fbde3eb630
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-03 15:31:10 +00:00
Christian Stenger
8cd7a11926 AutoTest: Fix handling of unnamed QuickTests
..now that the parser understands multiple TestCase items
inside a single qml file.
As long a test function is located inside a different TestCase
it is considered as a different one, so treat test functions
even of unnamed test cases correct.

Change-Id: I5cbfe1f63f896317523d51bbf67ea59169481a71
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-08-22 06:50:05 +00:00
David Schulz
6e84529a88 AutoTest: fine tune quick test case specs
and fix multiple inheritance

Change-Id: I031c8518437b7b396f5b17a51d2067e4b3661530
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-30 12:49:38 +00:00
Christian Stenger
c020fb6e3e AutoTest: Fix parsing of multiple test cases in single qml file
Quick tests allow definition of more than one TestCase inside a
qml file and even nesting is possible, so support this correctly.

Fixes: QTCREATORBUG-22761
Change-Id: I65fcc7cd6063d976d798c3e900d3299a12e2d73f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-30 10:45:09 +00:00
Christian Stenger
6189745a3b AutoTest: Adapt Type enum
Follow the official terms used by the test frameworks.
In detail this means Google test now uses TestSuite and TestCase
and the value for a normal function has been simplified to
TestFunction.
Beside the visual change there is no change in functionality.

Change-Id: Idf541d07fa3469e04a699d46f4625ff9075d5b6f
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-05-23 12:20:05 +00:00
Christian Stenger
3a4592609c AutoTest: Handle direct usage of quick_test_main
If users need to register additional QML types before Qt5.12
they need to bend the Quick tests magic a bit and use
quick_test_main or quick_test_main_with_setup directly.
The plugin supports something similar for QTest::qExec, so
allow this for Quick tests as well.

Task-number: QTCREATORBUG-20746
Change-Id: I672f8410914c6cc77abc901998f419dda35755ae
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-07-12 11:26:07 +00:00
Christian Stenger
31050ad6fc AutoTest: Fix detection of Quick tests name
Avoid setting and overwriting the test case name with
any string literal we find inside the TestCase item.
Instead use only the string literal used for the name
property and do not overwrite it after it had been set.

Task-number: QTCREATORBUG-20642
Change-Id: I69aedfc9f51df4943370c4736e6aa2af4c39b697
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-06-21 10:43:35 +00:00
Christian Stenger
5708f3aa34 AutoTest: Handle sub-typed TestCases correctly
Furthermore ensure that TestCase is really the Qml type
to avoid handling self-defined types as Quick Tests.

Task-number: QTCREATORBUG-17787
Change-Id: I08a6c70c3c166eefec6f24669cc225f568e51c7a
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-03-14 08:24:08 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +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
2f8b4b3fbf AutoTest: Move test framework related code...
...into files and respective sub folders.

Change-Id: Ic80d693bd73993a6e74b6d422349e47276e8cb6e
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-01 11:37:32 +00:00