summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-02-02 03:21:08 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2011-02-02 03:21:08 (GMT)
commit08fc37fbb09173bad771b36d2be14a2a359c140e (patch)
treed1eab9a81888f95c82fdb026a5adc0164a348903 /tests/auto/declarative
parent49df52abc004419f35bb6b508fb681c028a7c679 (diff)
parenta3010164fd904f4efe2dadb3df699004edaabd95 (diff)
downloadQt-08fc37fbb09173bad771b36d2be14a2a359c140e.zip
Qt-08fc37fbb09173bad771b36d2be14a2a359c140e.tar.gz
Qt-08fc37fbb09173bad771b36d2be14a2a359c140e.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml18
-rw-r--r--tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp13
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml b/tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml
new file mode 100644
index 0000000..8a49733
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml
@@ -0,0 +1,18 @@
+import QtQuick 1.1
+
+Rectangle {
+ property real loaderWidth: loader.width
+ property real loaderHeight: loader.height
+ width: 200
+ height: 200
+
+ Loader {
+ id: loader
+ sourceComponent: Item {
+ property real iwidth: 32
+ property real iheight: 32
+ width: iwidth
+ height: iheight
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
index 42746e8..f5218c7 100644
--- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
+++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
@@ -91,6 +91,7 @@ private slots:
void creationContext();
void QTBUG_16928();
void implicitSize();
+ void QTBUG_17114();
private:
QDeclarativeEngine engine;
@@ -619,6 +620,18 @@ void tst_QDeclarativeLoader::implicitSize()
delete item;
}
+void tst_QDeclarativeLoader::QTBUG_17114()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("QTBUG_17114.qml"));
+ QDeclarativeItem *item = qobject_cast<QDeclarativeItem*>(component.create());
+ QVERIFY(item);
+
+ QCOMPARE(item->property("loaderWidth").toReal(), 32.);
+ QCOMPARE(item->property("loaderHeight").toReal(), 32.);
+
+ delete item;
+}
+
QTEST_MAIN(tst_QDeclarativeLoader)
#include "tst_qdeclarativeloader.moc"