diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-04 11:12:41 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-04 18:59:34 +0200 |
commit | 80ed6679cd31165c2bbd2c612e37c2f61e9075a3 (patch) | |
tree | a6f8e41c243b966b3bb10f5746b83279187adb8c /tests/auto | |
parent | 17006757318814cfe5985f369aaf08851712493f (diff) | |
download | qtdeclarative-80ed6679cd31165c2bbd2c612e37c2f61e9075a3.tar.gz |
QmlCompiler: Recognize QList<QObject*> as QObjectList
Since QObjectList is a builtin, we can use it.
Pick-to: 6.5
Fixes: QTBUG-112529
Change-Id: I73c59d575092d5cccf28eecb5baaf2fd1e25c76a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp | 15 | ||||
-rw-r--r-- | tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h | 10 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp index 19f90a0e91..5635f633e8 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp @@ -642,4 +642,19 @@ void tst_qmltyperegistrar::typedEnum() })")); } +void tst_qmltyperegistrar::listSignal() +{ + QVERIFY(qmltypesData.contains( + R"(Component { + file: "tst_qmltyperegistrar.h" + name: "ListSignal" + accessSemantics: "reference" + prototype: "QObject" + Signal { + name: "objectListHappened" + Parameter { type: "QObjectList" } + } + })")); +} + QTEST_MAIN(tst_qmltyperegistrar) diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h index d14c4ed985..4d69922a86 100644 --- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h +++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.h @@ -557,6 +557,15 @@ public: Q_ENUM(V) }; +class ListSignal : public QObject +{ + Q_OBJECT + QML_ANONYMOUS + +Q_SIGNALS: + void objectListHappened(const QList<QObject *> &); +}; + class tst_qmltyperegistrar : public QObject { Q_OBJECT @@ -609,6 +618,7 @@ private slots: void anonymousAndUncreatable(); void omitInvisible(); void typedEnum(); + void listSignal(); private: QByteArray qmltypesData; |