summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-01 01:41:07 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-01 01:41:07 (GMT)
commit7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741 (patch)
tree07e839b8dd88c381471b96917ef5aafa484233b1 /tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp
parent6e8feab83fa9303b1345f4a27478ba3ee0316e86 (diff)
parent5cf8677758e6fbfa5bf360c73519c14630db808c (diff)
downloadQt-7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741.zip
Qt-7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741.tar.gz
Qt-7e85c6dc7ba0aaa6dfcad40dc0e9df0e2adb3741.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: src/declarative/util/qmlpixmapcache.cpp
Diffstat (limited to 'tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp')
-rw-r--r--tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp b/tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp
index b21da48..3d9ee46 100644
--- a/tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp
+++ b/tests/auto/declarative/qmlconnection/tst_qmlconnection.cpp
@@ -57,6 +57,7 @@ private slots:
void defaultValues();
void properties();
void connection();
+ void trimming();
private:
QmlEngine engine;
@@ -113,6 +114,26 @@ void tst_qmlconnection::connection()
delete item;
}
+void tst_qmlconnection::trimming()
+{
+ QmlEngine engine;
+ QmlComponent c(&engine, QUrl("file://" SRCDIR "/data/trimming.qml"));
+ QmlGraphicsItem *item = qobject_cast<QmlGraphicsItem*>(c.create());
+
+ QVERIFY(item != 0);
+
+ QCOMPARE(item->property("tested").toString(), QString(""));
+ int index = item->metaObject()->indexOfSignal("testMe(int,QString)");
+ QMetaMethod method = item->metaObject()->method(index);
+ method.invoke(item,
+ Qt::DirectConnection,
+ Q_ARG(int, 5),
+ Q_ARG(QString, "worked"));
+ QCOMPARE(item->property("tested").toString(), QString("worked5"));
+
+ delete item;
+}
+
QTEST_MAIN(tst_qmlconnection)
#include "tst_qmlconnection.moc"