aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 9b7286dc0e..5244530b66 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -101,6 +101,7 @@ private slots:
void dependenciesWithFunctions();
void deferredProperties();
void deferredPropertiesParent();
+ void deferredPropertiesOverwrite();
void deferredPropertiesByParent();
void deferredPropertiesErrors();
void deferredPropertiesInComponents();
@@ -1231,6 +1232,17 @@ void tst_qqmlecmascript::deferredPropertiesParent()
QCOMPARE(object->baseValue(), 10);
}
+void tst_qqmlecmascript::deferredPropertiesOverwrite()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("deferredPropertiesOverwrite.qml"));
+ QScopedPointer<QObject> obj(component.create());
+ QVERIFY2(obj, qPrintable(component.errorString()));
+ DeferredChildOverwrite *object = qobject_cast<DeferredChildOverwrite *>(obj.data());
+ QVERIFY(object != nullptr);
+ QCOMPARE(object->baseValue(), 10);
+}
+
void tst_qqmlecmascript::deferredPropertiesByParent()
{
QQmlEngine engine;