diff options
| author | Olivier De Cannière <olivier.decanniere@qt.io> | 2024-01-03 10:48:26 +0100 |
|---|---|---|
| committer | Olivier De Cannière <olivier.decanniere@qt.io> | 2024-01-09 10:40:49 +0100 |
| commit | 6f74f50fe412dc2c1d9aa1a98c405ae1f4983a48 (patch) | |
| tree | a3ee6ebddea5d0dc72177c6b0593a75c90212909 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 22d4a1b7950fa71566c53290a98be3397e910084 (diff) | |
Compiler: Handle all integer signs and sizes when converting primitives
Fixes: QTBUG-120473
Pick-to: 6.7
Change-Id: I4941cd1567d94823551e4cc94df8bc5b413e951c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 90114f8f5a..db6e6159a0 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -71,6 +71,7 @@ private slots: void conversionDecrement(); void conversionInDeadCode(); void conversions(); + void convertQJSPrimitiveValueToIntegral(); void convertToOriginalReadAcumulatorForUnaryOperators(); void cppValueTypeList(); void dateConstruction(); @@ -1306,6 +1307,15 @@ void tst_QmlCppCodegen::conversions() QVERIFY(!undef.isValid()); } +void tst_QmlCppCodegen::convertQJSPrimitiveValueToIntegral() +{ + QQmlEngine engine; + QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/convertQJSPrimitiveValueToIntegral.qml"_s)); + QVERIFY2(c.isReady(), qPrintable(c.errorString())); + QScopedPointer<QObject> o(c.create()); + QVERIFY(!o.isNull()); +} + void tst_QmlCppCodegen::convertToOriginalReadAcumulatorForUnaryOperators() { QQmlEngine engine; |
