aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltyperegistrar/metatypesjsonprocessor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* qmltyperegistrar: Remove QML.ManualRegistrationUlf Hermann2021-01-181-14/+0
| | | | | | | | | | This was needed because we couldn't automatically generate the types for the Qt object/namespace. Now we can. We should not offer this possibility to users as we need to see all the types at compile time. Such an escape hatch will only give us problems in the future. Change-Id: Ib86fddd0352cf1877a4123cad273c99c4252d8ac Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add support for extended types to qmltyperegistrarUlf Hermann2021-01-181-17/+18
| | | | | | | | | | | | | | | We generate the extensions as separate types. This also covers the case of value types being extended by "themselves". We can properly express this now, so we don't need the hackery of generating the local members of a type with QML_FOREIGN into the foreign type anymore. This also fixes interfaces from local types being written for foreign types. Fixes: QTBUG-89501 Change-Id: Ic76acd7eef09a92c1e36bd7a649c7a2deb24597b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltyperegistrar: Silence some static analysis warningsUlf Hermann2021-01-151-12/+12
| | | | | Change-Id: I1a4bdbb49e6700f2e218ebd349b823350bb09148 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Integrate sequences with registration macrosUlf Hermann2020-11-111-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | You get to write QML_SEQUENTIAL_CONTAINER(value_type) now, and qmltyperegistrar will generate a sensible registration call from that. A registration might look like this: struct MyStringListForeign { Q_GADGET QML_ANONYMOUS QML_SEQUENTIAL_CONTAINER(QString) QML_FOREIGN(MyStringList) QML_ADDED_IN_VERSION(3, 1) }; It's unfortunate that we need to use a metaobject to transfer all of this information, but there is no other sensible way. Transform the containers defined in qv4sequenceobject.cpp to use the new style, and move them out of the builtins, into QtQml. Recognize that only one of them was ever tested, and add tests for the rest. Task-number: QTBUG-82443 Change-Id: I3a30f9e27266bb575eea26c5daf5dad1ec461cc5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltyperegistrar: Move JSON processing into separate classUlf Hermann2020-11-061-0/+335
qmltyperegistrar.cpp was getting unwieldy. Change-Id: I2172253d81c0fca724bb0fef4a96d50a93c47428 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>