diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-09-05 11:13:26 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-05 13:01:46 +0200 |
commit | f69ace734178eaaef6b4689879923f9f916466bb (patch) | |
tree | 68f3896a05c55fa9bdb6e7e24f4d79e8aea809db /tests/auto/corelib | |
parent | d1a8623ecb4ef9f9942873503af7eb21a420ec7e (diff) |
QVariant: Make it possible to extract a QObject* from a wrapper without conversion.
Change-Id: I3a054d87d12e08d72dd4c77b6d467dc63f9a2231
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index 39b16200df..6baf6c4310 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -2266,6 +2266,7 @@ void tst_QVariant::qvariant_cast_QObject_wrapper() CustomQObjectDerived *object = new CustomQObjectDerived(this); QObjectWrapper wrapper(object); QVariant v = QVariant::fromValue(wrapper); + QCOMPARE(v.value<QObject*>(), object); v.convert(qMetaTypeId<QObject*>()); QCOMPARE(v.value<QObject*>(), object); |