summaryrefslogtreecommitdiffstats
path: root/tests/auto/qvariant/tst_qvariant.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-10-29 09:40:14 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-29 09:51:18 (GMT)
commitce0c22d4da46664636e651285f6e3ba38e77aea7 (patch)
tree06c131d04a87e8d73da286342831cd47704a6bfa /tests/auto/qvariant/tst_qvariant.cpp
parent00908877d47c72e178cb0cee643229e3f3e1c64e (diff)
downloadQt-ce0c22d4da46664636e651285f6e3ba38e77aea7.zip
Qt-ce0c22d4da46664636e651285f6e3ba38e77aea7.tar.gz
Qt-ce0c22d4da46664636e651285f6e3ba38e77aea7.tar.bz2
Fix qvariant_cast<QVariant> when a QVariant is really inside a QVariant
This fix the QPropertyAnimation test. Reviewed-by: Gabriel Reviewed-by: Thierry
Diffstat (limited to 'tests/auto/qvariant/tst_qvariant.cpp')
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index 61e9a4f..e2a606f 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -3380,6 +3380,10 @@ void tst_QVariant::variantInVariant()
QVariant var8 = qvariant_cast<QVariant>(QVariant::fromValue(QVariant::fromValue(str)));
QCOMPARE((int)var8.type(), (int)QVariant::String);
QCOMPARE(qvariant_cast<QString>(QVariant(qvariant_cast<QVariant>(var8))), str);
+
+ QVariant var9(qMetaTypeId<QVariant>(), &var1);
+ QCOMPARE(var9.userType(), qMetaTypeId<QVariant>());
+ QCOMPARE(qvariant_cast<QVariant>(var9), var1);
}
QTEST_MAIN(tst_QVariant)