summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-03-29 01:57:41 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-03-29 01:59:00 (GMT)
commit418bd7fa550da97ac27a34c72e75ec7ab0448d78 (patch)
tree47883d96f4ca1b786af5f18d56e943662a6acf38 /tests/auto
parent059a91650d7fdb7491108c07e3eda0e79e2d9203 (diff)
downloadQt-418bd7fa550da97ac27a34c72e75ec7ab0448d78.zip
Qt-418bd7fa550da97ac27a34c72e75ec7ab0448d78.tar.gz
Qt-418bd7fa550da97ac27a34c72e75ec7ab0448d78.tar.bz2
Don't emit QDeclarativePropertyMap::valueChanged() before the value has
changed. Task-number: QTBUG-9386
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
index 22c5581..d23de43 100644
--- a/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
+++ b/tests/auto/declarative/qdeclarativepropertymap/tst_qdeclarativepropertymap.cpp
@@ -123,7 +123,7 @@ void tst_QDeclarativePropertyMap::clear()
void tst_QDeclarativePropertyMap::changed()
{
QDeclarativePropertyMap map;
- QSignalSpy spy(&map, SIGNAL(valueChanged(const QString&)));
+ QSignalSpy spy(&map, SIGNAL(valueChanged(const QString&, const QVariant&)));
map.insert(QLatin1String("key1"),100);
map.insert(QLatin1String("key2"),200);
QCOMPARE(spy.count(), 0);
@@ -144,7 +144,9 @@ void tst_QDeclarativePropertyMap::changed()
QCOMPARE(txt->text(), QString('X'));
QCOMPARE(spy.count(), 1);
QList<QVariant> arguments = spy.takeFirst();
+ QCOMPARE(arguments.count(), 2);
QCOMPARE(arguments.at(0).toString(),QLatin1String("key1"));
+ QCOMPARE(arguments.at(1).value<QVariant>(),QVariant("Hello World"));
QCOMPARE(map.value(QLatin1String("key1")), QVariant("Hello World"));
}