summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-28 05:45:05 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-28 05:45:05 (GMT)
commit44be8cc3bb1aebd47f75dcf9cae54884322e1955 (patch)
tree548c76a8a6144955a1ba1ccc85e2c9f997fafa10 /tests/auto/declarative
parentdbba440da0677b8174d087d498d3d0dbd465548a (diff)
parente78a0d8f7449b81c971284310e6fb255d4a9d4eb (diff)
downloadQt-44be8cc3bb1aebd47f75dcf9cae54884322e1955.zip
Qt-44be8cc3bb1aebd47f75dcf9cae54884322e1955.tar.gz
Qt-44be8cc3bb1aebd47f75dcf9cae54884322e1955.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/declarative.pro4
-rw-r--r--tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml11
-rw-r--r--tests/auto/declarative/qmlecmascript/data/transientErrors.qml10
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp23
4 files changed, 47 insertions, 1 deletions
diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro
index b51e285..8b1c9cd 100644
--- a/tests/auto/declarative/declarative.pro
+++ b/tests/auto/declarative/declarative.pro
@@ -1,12 +1,14 @@
TEMPLATE = subdirs
SUBDIRS += anchors \
+ animatedimage \
animations \
+ behaviors \
datetimeformatter \
+ examples \
layouts \
listview \
numberformatter \
pathview \
- qbindablemap \
qfxloader \
qfxpixmapcache \
qfxtext \
diff --git a/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml b/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml
new file mode 100644
index 0000000..e19bf24
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/NestedTypeTransientErrors.qml
@@ -0,0 +1,11 @@
+import Qt 4.6
+
+Object {
+ property int b: obj.prop.a
+
+ property var prop;
+ prop: Object {
+ property int a: 10
+ }
+}
+
diff --git a/tests/auto/declarative/qmlecmascript/data/transientErrors.qml b/tests/auto/declarative/qmlecmascript/data/transientErrors.qml
new file mode 100644
index 0000000..4e123c6
--- /dev/null
+++ b/tests/auto/declarative/qmlecmascript/data/transientErrors.qml
@@ -0,0 +1,10 @@
+import Qt 4.6
+
+Object {
+ property var obj: nested
+
+ property var obj2
+ obj2: NestedTypeTransientErrors {
+ id: nested
+ }
+}
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index 67a98b1..48c2249 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -66,6 +66,7 @@ private slots:
void signalTriggeredBindings();
void listProperties();
void exceptionClearsOnReeval();
+ void transientErrors();
private:
QmlEngine engine;
@@ -847,6 +848,28 @@ void tst_qmlecmascript::exceptionClearsOnReeval()
QCOMPARE(object->property("test").toBool(), true);
}
+static int transientErrorsMsgCount = 0;
+static void transientErrorsMsgHandler(QtMsgType, const char *)
+{
+ ++transientErrorsMsgCount;
+}
+
+// Check that transient binding errors are not displayed
+void tst_qmlecmascript::transientErrors()
+{
+ QmlComponent component(&engine, TEST_FILE("transientErrors.qml"));
+
+ transientErrorsMsgCount = 0;
+ QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler);
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ qInstallMsgHandler(old);
+
+ QCOMPARE(transientErrorsMsgCount, 0);
+}
+
QTEST_MAIN(tst_qmlecmascript)
#include "tst_qmlecmascript.moc"