aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index 80ea1952cd..938d726784 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -134,6 +134,7 @@ private slots:
void trivialSignalHandler();
void stringToByteArray();
void listPropertyAsModel();
+ void notNotString();
};
void tst_QmlCppCodegen::simpleBinding()
@@ -2465,6 +2466,18 @@ void tst_QmlCppCodegen::listPropertyAsModel()
QCOMPARE(children.count(), 5);
}
+void tst_QmlCppCodegen::notNotString()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/notNotString.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+
+ QCOMPARE(o->property("notNotString").value<bool>(), false);
+ o->setObjectName(u"a"_s);
+ QCOMPARE(o->property("notNotString").value<bool>(), true);
+}
+
void tst_QmlCppCodegen::runInterpreted()
{
#ifdef Q_OS_ANDROID