summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.cpp
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-04-05 13:26:35 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-08 06:02:53 +0200
commit620f788f8690b10ef101f883d4cdacd2a277f948 (patch)
tree0fa8f9a6ff732fbba307837f3fb27045677a97a2 /src/corelib/kernel/qvariant.cpp
parent01fb843af88d949cd38b494a60bb64b730a045d2 (diff)
Add QVariantList extraction from a QVariant with a sequential container.
Change-Id: Id9fac7bf47ed3fbb385222b25941215ac24b8b88 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r--src/corelib/kernel/qvariant.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 7001e5b077..985433d83a 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -3085,6 +3085,13 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
returned. Note that this only works for QObject subclasses which use the
Q_OBJECT macro.
+ If the QVariant contains a sequential container and \c{T} is QVariantList, the
+ elements of the container will be converted into QVariants and returned as a QVariantList.
+
+ \snippet code/src_corelib_kernel_qvariant.cpp 9
+
+ The qRegisterSequentialConverter method must first be called for the container.
+
\sa setValue(), fromValue(), canConvert()
*/