summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-14 01:32:33 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-14 01:32:33 (GMT)
commit3b9f49b9c56554b06436e0353baa7e74dc412e8f (patch)
treeb79f11c8d843ba4ae7d1fcd8585d6efc148cccd9 /tests
parent0a10af2463d73106c2f1268553aa6e60890f6180 (diff)
parent3491cdb2c1c9184adfb0fab1e636afd784a6565e (diff)
downloadQt-3b9f49b9c56554b06436e0353baa7e74dc412e8f.zip
Qt-3b9f49b9c56554b06436e0353baa7e74dc412e8f.tar.gz
Qt-3b9f49b9c56554b06436e0353baa7e74dc412e8f.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp b/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp
index c9c37ab..c1b31c2 100644
--- a/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp
+++ b/tests/auto/declarative/qbindablemap/tst_qbindablemap.cpp
@@ -3,6 +3,7 @@
#include <QtDeclarative/qmlcontext.h>
#include <QtDeclarative/qbindablemap.h>
#include <QtDeclarative/qmlcomponent.h>
+#include <QtDeclarative/qfxtext.h>
#include <QSignalSpy>
class tst_QBindableMap : public QObject
@@ -58,11 +59,13 @@ void tst_QBindableMap::changed()
//make changes in QML
QmlEngine engine;
QmlContext *ctxt = engine.rootContext();
- ctxt->setContextProperty(QLatin1String("data"), &map);
- QmlComponent component(&engine, "import Qt 4.6\nScript { script: \"data.key1 = 'Hello World';\" }",
+ ctxt->setContextProperty(QLatin1String("testdata"), &map);
+ QmlComponent component(&engine, "import Qt 4.6\nText { text: { testdata.key1 = 'Hello World'; 'X' } }",
QUrl("file://"));
QVERIFY(component.isReady());
- component.create();
+ QFxText *txt = qobject_cast<QFxText*>(component.create());
+ QVERIFY(txt);
+ QCOMPARE(txt->text(), QString('X'));
QCOMPARE(spy.count(), 1);
QList<QVariant> arguments = spy.takeFirst();
QCOMPARE(arguments.at(0).toString(),QLatin1String("key1"));