summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-09-07 09:57:30 +0200
committerUlf Hermann <ulf.hermann@qt.io>2020-09-12 09:12:18 +0200
commit73fe229eb434236402ec1685b1f17f96417001b9 (patch)
treebc6bb03553b3bdcdf76f8ef478d532be9471404c /tests/auto
parent89c65bc8f7e4c9ab8198fba08eb1ef6f7f5184d2 (diff)
QMetaContainer: Add an "input" iterator capability
For completeness' sake we should expose this. The iterators provided by QIterable and friends will check the category at runtime, and should give sensible feedback. Change-Id: I778894f340c862f79a18c6c5607bcbba98dd7598 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
index a444a100be..d606f449cf 100644
--- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
+++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp
@@ -4531,7 +4531,8 @@ void tst_QVariant::shouldDeleteVariantDataWorksForSequential()
QtMetaContainerPrivate::QMetaSequenceInterface metaSequence {};
metaSequence.iteratorCapabilities = QtMetaContainerPrivate::RandomAccessCapability
| QtMetaContainerPrivate::BiDirectionalCapability
- | QtMetaContainerPrivate::ForwardCapability;
+ | QtMetaContainerPrivate::ForwardCapability
+ | QtMetaContainerPrivate::InputCapability;
metaSequence.sizeFn = [](const void *) { return qsizetype(1); };
metaSequence.createConstIteratorFn =
@@ -4680,7 +4681,8 @@ void tst_QVariant::sequentialIterableEndianessSanityCheck()
{
namespace QMTP = QtMetaContainerPrivate;
QMTP::IteratorCapabilities oldIteratorCaps
- = QMTP::ForwardCapability | QMTP::BiDirectionalCapability | QMTP::RandomAccessCapability;
+ = QMTP::InputCapability | QMTP::ForwardCapability
+ | QMTP::BiDirectionalCapability | QMTP::RandomAccessCapability;
QMTP::QMetaSequenceInterface seqImpl {};
QCOMPARE(seqImpl.revision, 0u);
memcpy(&seqImpl.iteratorCapabilities, &oldIteratorCaps, sizeof(oldIteratorCaps));