summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativetextedit
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-05-06 07:42:53 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-05-06 07:42:53 (GMT)
commita0ff96a8fd1cbf1206afd12e0062949fa035f64f (patch)
treeae00b137f60bbb8160990235a469baa7e92667f5 /tests/auto/declarative/qdeclarativetextedit
parent385799a8269dfb5b48de9e84e52af780fb400272 (diff)
downloadQt-a0ff96a8fd1cbf1206afd12e0062949fa035f64f.zip
Qt-a0ff96a8fd1cbf1206afd12e0062949fa035f64f.tar.gz
Qt-a0ff96a8fd1cbf1206afd12e0062949fa035f64f.tar.bz2
Call QDeclarativeItem::geometryChanged() base implementation
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextedit')
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml12
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp13
2 files changed, 24 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml
new file mode 100644
index 0000000..b39ba5b
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml
@@ -0,0 +1,12 @@
+import Qt 4.7
+
+Item {
+ width: 400; height: 500;
+ property int bindingWidth: text.width
+ property int bindingHeight: text.height
+
+ TextInput {
+ id: text
+ anchors.fill: parent
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index 3307b7c..8cc0e3f 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -84,7 +84,7 @@ private slots:
void navigation();
void readOnly();
void sendRequestSoftwareInputPanelEvent();
-
+ void geometrySignals();
private:
void simulateKey(QDeclarativeView *, int key);
QDeclarativeView *createView(const QString &filename);
@@ -808,6 +808,17 @@ void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent()
QApplication::processEvents();
QCOMPARE(ic.softwareInputPanelEventReceived, true);
}
+
+void tst_qdeclarativetextedit::geometrySignals()
+{
+ QDeclarativeComponent component(&engine, SRCDIR "/data/geometrySignals.qml");
+ QObject *o = component.create();
+ QVERIFY(o);
+ QCOMPARE(o->property("bindingWidth").toInt(), 400);
+ QCOMPARE(o->property("bindingHeight").toInt(), 500);
+ delete o;
+}
+
QTEST_MAIN(tst_qdeclarativetextedit)
#include "tst_qdeclarativetextedit.moc"