diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2014-04-29 15:31:51 +0200 |
---|---|---|
committer | Ismo Haataja <ismo.haataja@digia.com> | 2014-06-16 07:44:02 +0200 |
commit | 4e7baaaa91ce663b0b5c315e5b049d1574aef73f (patch) | |
tree | 6012cff006d772adfaa8681bad4871817f141b74 /tests | |
parent | 4b8a81f52516d59801637520533cb298aeb802e7 (diff) |
Metatype: Specialize IteratorOwner for vector<bool>
Change-Id: I542af3a77b0a139e137a5a736b74042a8c25eb95
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp index b65bddbf65..9a86dc03e5 100644 --- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp @@ -1360,6 +1360,17 @@ void tst_QMetaType::automaticTemplateRegistration() TEST_SEQUENTIAL_CONTAINER(std::list, int) { + std::vector<bool> vecbool; + vecbool.push_back(true); + vecbool.push_back(false); + vecbool.push_back(true); + QVERIFY(QVariant::fromValue(vecbool).value<std::vector<bool> >().front() == true); + QVector<std::vector<bool> > vectorList; + vectorList << vecbool; + QVERIFY(QVariant::fromValue(vectorList).value<QVector<std::vector<bool> > >().first().front() == true); + } + + { QList<QByteArray> bytearrayList; bytearrayList << QByteArray("foo"); QVERIFY(QVariant::fromValue(bytearrayList).value<QList<QByteArray> >().first() == QByteArray("foo")); |