diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-03-17 11:42:50 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-03-21 12:45:26 +0100 |
commit | c10c513b6fa596e7e94bad6c31c160b06b0daccd (patch) | |
tree | d2d5c12123c88d84cb50767a2627542feec4f191 /tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp | |
parent | 07a8850933a049c1a2931c2ac358517a6fb88038 (diff) |
qmltyperegistrar: Do not guess types with upper case names
We generally need to guess value types since there are value types
without metaobjects of their own, such as QRectF and QSizeF. However, if
they have upper case element names, they are clearly not in that
category. Guessing those as value types will make further tools produce
follow-up mistakes.
Fixes: QTBUG-111986
Change-Id: Ic15ef8c726eb3913c87eb4a300794f321f59fafa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c2fd73b516f6021f0ebb9f5cfd4de79f3f437f51)
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Diffstat (limited to 'tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp')
-rw-r--r-- | tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp index aeb46a8274..27f83ca22f 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp @@ -300,4 +300,11 @@ void tst_qmltyperegistrar::methodReturnType() QVERIFY(qmltypesData.contains("type: \"QQmlComponent\"")); } +void tst_qmltyperegistrar::omitInvisible() +{ + // If it cannot resolve the type a QML_FOREIGN refers to, it should not generate anything. + QVERIFY(qmltypesData.contains( + R"(Component { file: "tst_qmltyperegistrar.h"; name: "Invisible"; accessSemantics: "none" })")); +} + QTEST_MAIN(tst_qmltyperegistrar) |