aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorOlivier De Cannière <olivier.decanniere@qt.io>2024-02-07 10:11:41 +0100
committerOlivier De Cannière <olivier.decanniere@qt.io>2024-02-07 17:23:01 +0100
commit72308ce2076aef3b663aa769e32e71d4b0bf645c (patch)
tree5a9caca89c5179a8d03734fdc48465b85f5930b8 /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parentbf7ed10ce1ed31e24a35bc786424656308c91256 (diff)
Compiler: Convert from stored to original type when generating equality
Pick-to: 6.7 Fixes: QTBUG-121909 Change-Id: I913f59324364052d7893d4c4072f92fcf418a388 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.cpp10
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 b98da74716..1f7e7eeb1f 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -202,6 +202,7 @@ private slots:
void setLookupConversion();
void shadowedAsCasts();
void shadowedMethod();
+ void shadowedPrimitiveCmpEqNull();
void shifts();
void signalHandler();
void signalIndexMismatch();
@@ -4099,6 +4100,15 @@ void tst_QmlCppCodegen::shadowedMethod()
QCOMPARE(o->property("cthing"), QVariant::fromValue(u"c"_s));
}
+void tst_QmlCppCodegen::shadowedPrimitiveCmpEqNull()
+{
+ QQmlEngine e;
+ QQmlComponent c(&e, QUrl(u"qrc:/qt/qml/TestTypes/shadowedPrimitiveCmpEqNull.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+}
+
void tst_QmlCppCodegen::shifts()
{
QQmlEngine engine;