summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qvariant.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-06 12:38:51 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-10 15:55:52 +0100
commit32b506d1db1f8cee748a27b548ba8208f2928058 (patch)
tree2d5b23baafe22ccc3518719f8f5d19bb846b2b61 /src/corelib/kernel/qvariant.cpp
parent2cb1db64370989fffeec313c196fe573c479e6aa (diff)
parentc0948d508e7179e2e23c893ba6152c40400de060 (diff)
Merge remote-tracking branch 'origin/dev' into 5.11
Conflicts: src/corelib/tools/qvarlengtharray.qdoc src/corelib/tools/qvector.qdoc Resolved documentation changes in favor of 017569f702b6dd0, which keeps the move overloads along with its const-ref sibling. Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r--src/corelib/kernel/qvariant.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 6fcc6b8d30..7ccacd883f 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -3892,6 +3892,19 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p)
\sa setValue(), value()
*/
+/*! \fn static inline QVariant fromStdVariant(const std::variant<T, Types...> &value)
+ \since 5.11
+
+ Returns a QVariant with the type and value of the active variant of \a value. If
+ the active type is std::monostate a default QVariant is returned.
+
+ \note With this method you do not need to register the variant as a Qt metatype,
+ since the std::variant is resolved before being stored. The component types
+ should be registered however.
+
+ \sa fromValue()
+*/
+
/*!
\fn template<typename T> QVariant qVariantFromValue(const T &value)
\relates QVariant