diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-17 14:40:00 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-05-19 22:30:23 +0200 |
| commit | 4a10e1d84ac948fb9a50cd2e44fcbeaef972e5ea (patch) | |
| tree | 9d9b1e545c696a1c272b5c732ca690afd62f7157 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 95bf351912d3a8b86d2a58bb27b2244823aef7e9 (diff) | |
QmlCompiler: Detect non-integral values when accessing QQmlListProperty
Pick-to: 6.2 6.3
Fixes: QTBUG-103560
Change-Id: Ifcc73baf7f79e30f6e83ff3e500dd39f95790bfe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 29a8a36e28..cbcd1afd21 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -1559,6 +1559,10 @@ void tst_QmlCppCodegen::listIndices() for (int i = 0; i < 3; ++i) QCOMPARE(list.at(i), o.data()); QCOMPARE(o->property("numItems").toInt(), 3); + QCOMPARE(qvariant_cast<QObject *>(o->property("fractional")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(o->property("negativeZero")), o.data()); + QCOMPARE(qvariant_cast<QObject *>(o->property("infinity")), nullptr); + QCOMPARE(qvariant_cast<QObject *>(o->property("nan")), nullptr); } void tst_QmlCppCodegen::jsMathObject() |
