Commit Graph

27354 Commits

Author SHA1 Message Date
Andrei Golubev dd153ad174 qmltc: Compile QML methods to C++
This also requires some changes to the output IR + couple things
could also be fixed while at it

Task-number: QTBUG-84368
Change-Id: Ie1535cbbe36cd874e9787ea91fe85b638326de20
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-17 18:04:41 +01:00
Andrei Golubev 590dd43c4d qmltc: Compile QML enums into C++
Task-number: QTBUG-84368
Change-Id: Idf6c724496c807477ce0914ab0d32a80a9b90b5a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-17 18:04:41 +01:00
Ulf Hermann 06d99e4032 Blacklist tst_qquickimage::mirror() on macOS 12
Task-number: QTBUG-98402
Change-Id: Ic0fec0d066238346093641145483092f3289a3af
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-11-17 15:25:06 +01:00
Mitch Curtis 96ee0baf1b Material: distinguish highlighted buttons from highlighted & checked
Make the button lighter in the light and dark themes.

Fixes: QTBUG-91886
Pick-to: 6.2
Change-Id: I0c21eef31e82cf23b729c16ae469e2938d6c490c
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-11-16 10:32:02 +00:00
Andrei Golubev aa23202c82 Test that a signal is created for QML property when using QQmlComponent
This is the current behavior and it does not seem to be tested
Whoever decides to change the behavior should likely also update this
test then. For now, let's use it as a reference

Change-Id: Id6952238cae7548fba1f2d907f681ffb8f1e99c5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-16 09:03:06 +01:00
Andrei Golubev 6ec7953257 qmltc: support user-specified namespaces in the generated code
Already during the prototyping phase, conflicts in class names were
encountered within Qt code base. Those could be avoided by namespaces.
Initial qmltc logic was using meaningless "q_qmltc" namespace, so let's
improve that by allowing user-specified namespaces + making Qt's own
QML files (compiled to C++) being available under QT_NAMESPACE. The
latter is achieved by providing (and using) the internal version of a
qmltc-invoking function

Task-number: QTBUG-84368
Task-number: QTBUG-96040
Change-Id: I99cdf1baba8838c093b6b469f6744869f72af093
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-16 09:02:57 +01:00
Oliver Eftevaag 88dfbe0dea Rendercontrol example: use new cmake api
Updating the CMakeLists.txt files in the d3d11 and opengl version of
the example to use the new qt_add_qml_module() function instead of the
old qt_add_resources()

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: Ida43e4b0c875951a85d754b3a96f88366b580e24
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-15 23:07:17 +01:00
Ulf Hermann 7de2bca4ab qmllint: Use the raw type for type inference, not the stored one
If we use the stored type, we lose important information.

Change-Id: I09264642cee8da2bd9103d01488855ebbc5648b5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-15 18:48:57 +01:00
Ulf Hermann 0a44706d9a QmlCompiler: Sort files in CMakeLists.txt
Change-Id: I2e049c715778acd7823411d16b40238be0a34b84
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-15 18:48:53 +01:00
Ulf Hermann 87bee5aa79 Make a few member functions const
They don't change anything.

Change-Id: Iba7ecdc0658d44db5fd2060d23150e704e9446ad
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-15 18:48:47 +01:00
Kai Köhne d17a49a5c5 Explicitly include qloggingcategory.h
Do not rely on QLoggingCategory being implicitly declared through
other headers.

Pick-to: 6.2
Change-Id: Ib6cda43f281d31a7127dd591be2540fb00a0a699
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
2021-11-15 15:38:11 +01:00
Ulf Hermann c5ac90ace6 qmllint: Do not crash on missing qmltypes files
Change-Id: Iba0f30caacaace7fcdc8b69b06d23989d6915bf3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-15 15:34:17 +01:00
Andrei Golubev 0990b892ca qmltc: Introduce object creation infrastructure
The so-far strategy is the following:
* allocate a linear storage for the QObject pointers
  using QQmltcObjectCreationBase (to reference the
  to-be-created objects)
* "type-erase" the QQmltcObjectCreationBase into
  QQmltcObjectCreationHelper (so now we don't need to
  know the template specialization across different
  QML documents): non-document roots' ctors can accept
  QQmltcObjectCreationHelper as an input parameter
* use QQmltcObjectCreationHelper to set object pointers
  into the storage when creating all the objects (also
  from other QML documents)
* use QQmltcObjectCreationHelper later to retrieve
  necessary objects during creation finalization

Provide basic implementation for the first and second bullets
straight away

This model seems to allow to hide the details of QQmltcObjectCreationBase
interaction within the QML top-level document root (the type that we
instantiate in the user code), which is very convenient

Task-number: QTBUG-84368
Change-Id: I04cf64c54e48f169acfd4337cf93a58a05336b3b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-15 12:00:55 +01:00
Andrei Golubev 539a08d1f4 qmltc: Learn to collect C++ includes for a type hierarchy
We need this to be able to properly include types, properties, etc.
The strategy right now is very exhaustive but it seems necessary (afair)
to be able to support weird cases with non-trivial forward declarations

As a drive-by, fix some mistakes in QQmlJSScopeVisitor and its qmltc's
counterpart

Task-number: QTBUG-84368
Change-Id: I97719222598af85886821c0bf6e0e788770c8924
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-15 12:00:52 +01:00
Andrei Golubev 4bfc7847f2 qmltc: Be aware of macOS frameworks when running manual MOC
We need some boilerplate to make moc generate meaningful code under
macOS when using -DFEATURE_framework=ON. Otherwise the meta object data
is rubbish

Note that we only care about Qt's own modules in the qmltc setting.
There's no way (currently and likely ever) qmltc is able to generate
MOC-specific code outside of what's defined in Core and Qml headers

Task-number: QTBUG-96040
Change-Id: Idbfb68509b5ba6a6c1445dd3653c8b898d19737d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-15 12:00:48 +01:00
Milla Pohjanheimo 437a916099 Add BC files for 6.2.0
Binary compatibility files added.

Pick-to: 6.2

Change-Id: I97387b14c93e4da7b671709cdf4db5b0bfd05536
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-15 07:05:42 +00:00
Venugopal Shivashankar dc569a6189 Doc: Fix qdoc warnings
- Comment out \instantiates entries that refer to private C++ classes
- Fix clang-format and regexp warnings

Change-Id: I7228538715b9d34ab39e7c0f71155be7a277116a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-11-14 23:47:54 +01:00
Fabian Kosmale d7c2c884cf Purge old AST dumper and use the functionality provided by the QML DOM
This reduces the number of AST visitors we need to maintain.

Change-Id: I9b55706092b4b285816fe6680c94116694bd1f05
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-13 09:13:00 +01:00
Andrei Golubev 91ed4cdae1 Make QQmlEngine take care of QQmlContext setup
Teach QQmlEnginePrivate to create QQmlContextData for object creation
purposes. This is necessary for both QQmlObjectCreator and qmltc's
generated code

Since tst_qmltc_manual used to test roughly the same code, replace the
test-local implementation with the new one

Task-number: QTBUG-84368
Change-Id: I58a1d4b259f42170d6dfb3809b7dd894bcbacbe1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-12 18:57:43 +01:00
Antti Määttä e0db57f9d0 Do not reset loops when creating designer objects
Fix looping in designer particle editor when the particle system is in
sub-component. When it is not in sub-component, the editor resets the loops,
but not when it is in sub-component.

Fixes: QDS-5481
Pick-to: 6.2
Change-Id: I81b392d95c2928244f91f00e0a93853356e1c287
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-12 13:24:30 +02:00
Venugopal Shivashankar e48a70fa37 Doc: Move Qt global type docs
Documenting the members of this qml type in different
source files, leads to unnecessary qdoc warnings. Having
all the docs in one place also make maintenance easier.

Change-Id: If1717f6227c58a5c90b1dfd24c08affe9b81bf84
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-12 12:24:30 +01:00
Oliver Eftevaag a155b3bc3e Model examples: use new cmake api
The models directory contains 3 subdirectories with an example project
in each.

This patch updates the CMakeLists.txt files to use qt_add_qml_module()
instead of the old qt_add_resources().

In order to achieve intercompatibility with both cmake and qmake, I had
to do some slight modifications to both the .qrc files and the url path
used to set the source to the QQuickView.

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I13d1c01a0eda181823f394bc2a4259ce98abd4f8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-12 12:24:29 +01:00
Ulf Hermann bdbc91cb90 Fix life cycle methods of various types related to QQmlBind
Code checker complains about the absence of move ctors and operators.
While we're at it, make ctors default where possible, do not use const
rvalue refs, add noexcept where possible, properly disable moving and
copying of QQmlBindEntryContent, and inline the null check of
QV4::PersistentValueStorage::free().

Change-Id: I11b6511f39f3d84479dbacee7f3e3552a5fb2b5a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-12 12:24:29 +01:00
Joerg Bornemann 21237e4056 qmake/vcxproj: Fix qmltypes files being displayed at project root
In qmake-generated Visual Studio projects the generated .qmltypes files
were displayed at the project root.  The reason is QTBUG-91033: multiple
extra compilers use that file as input.

Turn off the fake rule qmltyperegistrar_qmltypes for Visual Studio
projects.  This rule is supposed to make $$QMLTYPES_FILENAME known to
the build system in Makefile generators.  This is only necessary if one
needs to create extra compilers that work on $$QMLTYPES_FILENAME, which
- judging from Qt's own examples - seems to be an exceptional case.

Pick-to: 5.15 6.2
Task-number: QTBUG-91033
Task-number: QTBUG-94806
Change-Id: Id8d45264d0922bcc3d201ce216663c9ca7d44fa2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-12 08:44:45 +00:00
Oliver Eftevaag fe59c788a6 painteditem: better error message when running cmake on textballoon
Building the TextBalloon in isolation doesn't make any sense.
Its purpose is to implement a delegate, for the painteditem example to
use, and should therefore only be built as part of the painteditem
project.

To build the example, cmake should be invoked with
examples/quick/customitems/painteditem/CMakeLists.txt as its source
path.

The CMakeLists.txt in examples/quick/customitems/painteditem/TextBalloon
should only be used from another CMakeLists.txt file via the
add_subdirectory() command. If invoked directly it makes sense to print
an error message and stop processing.

Task-number: QTBUG-96806
Pick-to: 6.2
Change-Id: I1ebd2157790afbf7307498a4fb64049794ae6c5b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-11 13:11:40 +02:00
Oliver Eftevaag fb26412952 Embeddedinwidgets example: use qt_add_qml_module()
We want to use the new cmake api, rather than qt6_add_resources()

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I567aec77b963adce03fb683c244d758880891ce5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-11 11:11:40 +00:00
Oliver Eftevaag 750e7d946c Keyinteraction example: use qt_add_qml_module() in CMakeLists.txt
We want to use the new cmake api instead of qt6_add_resources()
The file structure has also been flattened a bit.

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I1651d25e2902bf6932b78c2224ee4ffe454b658d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-11 12:11:40 +01:00
Oliver Eftevaag 28bfd773ca MouseArea example: use qt_add_qml_module() and update a signal handler
Thing patch updates the CMakeLists.txt file to use qt_add_qml_module()
instead of qt6_add_resource().

Additionally, it changes a signal handler, which was previously a plain
statement, into a js function, which is the preferred way to write signal
handlers.

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I1b08dcd3eae370d78587aa3d37d9456437b54b42
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-11 11:11:40 +00:00
Oliver Eftevaag aa4897e017 Particle examples: use new cmake api
The particles directory contains 5 different examples
and a shared directory with some images files.

This patch changes the examples to use qt_add_qml_module()
in the CMakeLists.txt project files, and changes the .qrc
files to directory reference the files needed by the individual
projects, which removes the need for images.qrc.
(The .pro files still reference the shared.qrc file)

The "content" directories located in the different example
projects, have been removed, and the containing files have simply
been moved to the parent directories instead.

Some unused files in the itemparticle example have also been
deleted. This example looks very outdated and should ideally
be improved, or perhaps simply removed, but I decided to leave
it for now.

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: If05986b4347814715bca50b8d3f6a5cddbf9ced4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-11 12:11:40 +01:00
Mitch Curtis 56f00a8429 Add regression test for QQmlEngine::retranslate() crash
Original-patch-by: Mitch Curtis <mitch.curtis@qt.io>
Task-number: QTBUG-84196
Pick-to: 6.2
Change-Id: Idb5e3cf89c7866a7493645087180843dacf24210
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-11 12:11:40 +01:00
Antti Määttä 3bf5e8b671 Use resize instead of shrink when clearing upload pools
Fix creator qml puppet crash at startup due to nullptr exception. The
puppet clears the cached resources, which calls shrink(0) to the vertex
and index upload pools. The shrink only sets the capacity to 0 and
deallocates the buffer, but leaves the size intact. The next time the
upload pools are used they are not reallocated, because only the size
gets checked. Use resize instead of shrink since it calls the shrink
and also sets the size to zero.

Fixes: QTBUG-98150
Pick-to: 6.2 5.15
Change-Id: Id852e71d4caa0f6c5ca560142024ca9d143df7f8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2021-11-11 13:11:40 +02:00
Ulf Hermann ef5fbbae1d QQmlJSTypePropagator: Drop registerDeletionReason member
We never use it.

Change-Id: I10ad82273c8685ab2cb5e5b1254c323e2a058a38
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-11-11 09:41:50 +01:00
Ulf Hermann adf0f541e5 QQmlJSTypeResolver: Don't store the importer
We only need it to extract the builtins at construction time.

Change-Id: I5269dea2ad1afc0a793c2b8e92d0bb507647afce
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-11 09:40:49 +01:00
Fabian Kosmale be194d965d Handle function as default arguments in toplevel functions
Top level functions, that is, those directly defined in a QML component
as opposed to those defined inside another function or class, are not
visited directly by the ScanFunction visitor. Instead, they are manually
considered in generateJSCodeForFunctionsAndBindings, and the visitor is
then run on their body.
This worked mostly fine, with one notable exception: In case there is a
function expression used as the default value of a function parameter,
that function would have never been visited. This would lead to
subsequent asserts/crashes in the codegen, as the function was not
properly set up.
We fix this by manually visiting the function's formals in addition to
the body.

Pick-to: 6.2 5.15
Fixes: QTBUG-98032
Change-Id: I5cb4caae39ab45f01a0dfa1555099d7d4b796a19
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-10 22:02:29 +01:00
Qt Submodule Update Bot 3d23912b0e Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I326b66fa87c4fbd1ad3c9c1121b56e28ecaceb78
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2021-11-10 16:26:41 +00:00
Ulf Hermann d1409760ec Do not crash on self-assignment of QQmlProperty
If you had a QQmlPropertyPrivate with only one reference, assigning its
QQmlProperty to itself would delete the QQmlPropertyPrivate.

Pick-to: 5.15 6.2
Change-Id: I73f8e6df63af09d3f43a101749a5800153499057
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-10 11:22:15 +01:00
Ulf Hermann 86c482737b qmllint: Decouple the parenting mode from the QML semantics
qmllint wants only the parenting. It should still warn about shadowing
(once it can).

Change-Id: If49a11cd086643f9626754fdeaaf6a9a7c1bc626
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-10 10:58:51 +01:00
Ulf Hermann 3b0125f5ec QV4::QObjectWrapper: Clean up CallArgument
Prefer comparison of metatypes by type rather than ID. When still
comparing by ID take advantage of switching through the builtin types.
Furthermore, restructure the code for more clarity and consistently
apply the qml_sequence_type guards.

Change-Id: I7572ba644621ac551ae1821a59229b60c1485a1d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-09 23:17:31 +01:00
Ulf Hermann cdd8fc015f Allow deferring of attached properties
They should behave just like everything else. Also, realize that when
applying deferred bindings, we have to apply the deferred bindings of
any subobject, too. Otherwise we get rather confusing behavior.

Change-Id: I7a5b0630284f7a0020549de6dee903f46352d12e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-09 23:17:17 +01:00
Fabian Kosmale 332099038d QQmlJSImportVisitor: Handle on binding inside grouped properties
The visitation logic for UiObjectBinding was entering nested scopes for
attached and grouped properties to check if their scopes need to be
resolved. However, the logic to leave those scopes was faulty: It left
the current scope as long as the current scope was a attached or grouped
property scope. That would however break if an on-binding (triggering
this code path) were placed in a grouped property. In that case, we
would leave the grouped property scope, even though it should have still
been the current scope.
Fix the issue by explicitly counting how many scopes we were entering,
and leave the corresponding number of scopes afterwards.

As a drive-by, turn a "verbal assertion" in a Q_ASSERT in endVisit.

Pick-to: 6.2
Fixes: QTBUG-98125
Change-Id: I270b1bf3fc5b38ad9d437df1ea6c55684d143378
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 18:55:15 +01:00
Mitch Curtis 5e8e12b342 Fix CMakeLists.txts of chattutorial
- Run pro2cmake.py on each .pro and did some manual adjustments.
- Rename directories to simplify resource paths, URIs, etc.
- Rename executables to ensure they're distinguishable from other
  targets in Creator's locator.
- Duplicate images into each example due to issues with resources.
- Now that we use qt_add_qml_module, the qtquickcontrols2.conf
  file will no longer be at the resource root, so specify it
  separately with qt6_add_resources.
- Update qmake files.
- Fix documentation.

Task-number: QTBUG-98130
Pick-to: 6.2
Change-Id: I210ef2cbcd45dd7f4df881332174bff1b18c5be7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 18:55:15 +01:00
Volker Hilsheimer de6c7aa734 Avoid conflicts with Windows headers
Windows COM headers #define interface struct, and we seem to have some
private includes pulling in a platform header, breaking builds.

Rename variables and parameters from 'interface' to 'iface'.

Pick-to: 6.2
Change-Id: I233a2b0f4a488129806a5ae05fa1080d29b36e0e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-11-09 18:55:15 +01:00
Fabian Kosmale 72af59ed52 QQmlJSImportVisitor: Remove dead code
Change-Id: Ie5c9eeacf943e8e78df99964c6a198187ae48502
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 18:55:15 +01:00
Fabian Kosmale 4dded9a0db QQmlJSImportVisitor: handle ids correctly
QML allows to assign a string to an id (id: "foo"), so we need to handle
string literalts. Furthermore, invalid QML can contain arbitrary things,
so we make QQmlJSImportVisitor more robust and issue an warning if we do
not encounter a string literal or id expression (it used to crash
before).

Pick-to: 6.2
Fixes: QTBUG-98115
Change-Id: I97b8fc1af5ef2f41d93ce180ac8d2b2cdb8d9975
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 18:55:14 +01:00
Andrei Golubev d4a28c6adc qt6_target_compile_qml_to_cpp: improve QT_QMLTC_FILE_BASENAME handling
Let's simplify the whole output path logic for .cpp and .h:
- there's really little use in relative prefixes (e.g. we don't need
  data/ in data/HelloWorld.qml to operate)
- similarly, let's ignore/discourage the use of such prefixes in
  QT_QMLTC_FILE_BASENAME. I envision poor output dir structure otherwise
  (not that anyone will notice it anyway)

As a drive by, also replace CMAKE_CURRENT_*_DIR with target_*_dir as we
should really use target's dir structure, not the (potentially wrong)
current dir structure

Task-number: QTBUG-96040
Change-Id: Ib9a108941e5179809855d28003ec157a07163c0e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 15:14:27 +01:00
Andrei Golubev 7f018794be Make QML builtins files available in resource file system
Thus ensuring that the builtins are always present, even if the
Qt build/installation is weird

(Kind of) amends 363c233575

Pick-to: 6.2
Task-number: QTBUG-97986
Change-Id: I7cf41781ec37bf531d1b45ae95296fcb3546673d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 14:14:02 +00:00
Andrei Golubev a50ab6b30c qmltc: Do not crash on import errors
Task-number: QTBUG-84368
Change-Id: I8d2a39a3c064d0542b9bf56cbf8246ae18975f04
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 15:13:45 +01:00
Andrei Golubev ec3d0cb2d7 qmltc: add tests that work through QProcess
It is useful to run the qmltc "manually" on several occasions.
One of such is the testing of how qmltc handles errors

Task-number: QTBUG-84368
Change-Id: Ibc5d7bf14643c77ac8ae97fbff008fe262161be5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2021-11-09 15:12:04 +01:00
Ulf Hermann 79c619bdaa QmlDom: Don't compare metatypes by ID
Retrieving the ID is unnecessary overhead in many cases.

Change-Id: I02af44ee6cddf3ed7cb985dae24f208c56d91fb9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-11-09 11:46:52 +01:00
Fawzi Mohamed 872f033fc5 qmldom: follow the QML code conventions when reformatting
Reorder the attributes according to the sequence defined in the QML
Coding Conventions.

Change-Id: I4f71c51e86c33100ce2d9622cf7ed6e03d672453
Pick-to: 6.2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-11-09 11:46:52 +01:00