aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2025-12-15 16:14:22 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2025-12-15 16:14:22 +0200
commitb58ec3b086518da5aa573f99426235854c23e35f (patch)
tree861a9935d8f1cdba2fdca546836a351736dbddbf /tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
parent4826f86e274f1b29bd769e6790824f9e62a40f62 (diff)
parent22032227d16c39211e2ebceef97d21f4d89c7c87 (diff)
Merge tag 'v6.5.8-lts-lgpl' into 6.56.5
Qt 6.5.8-lts-lgpl release
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 7992896506..b7dff336af 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -6222,7 +6222,7 @@ class EnumTester : public QObject
public:
enum Types
{
- FIRST = 0,
+ FIRST = 42,
SECOND,
THIRD
};
@@ -6236,13 +6236,18 @@ void tst_qqmllanguage::qualifiedScopeInCustomParser()
QQmlEngine engine;
QQmlComponent component(&engine);
component.setData("import QtQml.Models 2.12\n"
+ "import QtQml\n"
"import scoped.custom.test 1.0 as BACKEND\n"
"ListModel {\n"
+ " id: root\n"
+ " property int num: -1\n"
" ListElement { text: \"a\"; type: BACKEND.EnumTester.FIRST }\n"
+ " Component.onCompleted: { root.num = root.get(0).type }\n"
"}\n", QUrl());
QVERIFY2(component.isReady(), qPrintable(component.errorString()));
QScopedPointer<QObject> obj(component.create());
QVERIFY(!obj.isNull());
+ QCOMPARE(obj->property("num").toInt(), 42);
}
void tst_qqmllanguage::checkUncreatableNoReason()
@@ -8262,6 +8267,14 @@ void tst_qqmllanguage::overrideInnerBinding()
QCOMPARE(o->property("width").toReal(), 20.0);
QCOMPARE(o->property("innerWidth").toReal(), 20.0);
+
+ QQmlComponent c2(&e, testFileUrl("Wrap.qml"));
+ QVERIFY2(c2.isReady(), qPrintable(c2.errorString()));
+ o.reset(c2.create());
+ QVERIFY(!o.isNull());
+
+ QFont font = qvariant_cast<QFont>(o->property("font"));
+ QCOMPARE(font.family(), "Ariallll");
}
QTEST_MAIN(tst_qqmllanguage)