aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 47a9f3927b..fd35a5b873 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -48,6 +48,7 @@
#include <QtCore/qfileinfo.h>
#include <QtCore/qdir.h>
#include <QSignalSpy>
+#include <QFont>
#include <private/qqmlproperty_p.h>
#include <private/qqmlmetatype_p.h>
@@ -190,6 +191,8 @@ private slots:
void scopedProperties();
+ void deepProperty();
+
private:
QQmlEngine engine;
QStringList defaultImportPathList;
@@ -3150,6 +3153,15 @@ void tst_qqmllanguage::scopedProperties()
QVERIFY(o->property("success").toBool());
}
+void tst_qqmllanguage::deepProperty()
+{
+ QQmlComponent component(&engine, testFile("deepProperty.qml"));
+ QScopedPointer<QObject> o(component.create());
+ QVERIFY(o != 0);
+ QFont font = qvariant_cast<QFont>(qvariant_cast<QObject*>(o->property("someObject"))->property("font"));
+ QCOMPARE(font.family(), QStringLiteral("test"));
+}
+
// Tests that the implicit import has lowest precedence, in the case where
// there are conflicting types and types only found in the local import.
// Tests that just check one (or the root) type are in ::importsOrder