diff options
author | Martin Smith <martin.smith@qt.io> | 2018-03-12 14:26:42 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-03-14 12:59:35 +0000 |
commit | 91b35011f52c092360314e4a625e1f806402af5e (patch) | |
tree | 83f293aad81f6117619c0c60a8fe1316ea2cf880 /src | |
parent | a62f1d03560937a306c7586669a46cd9575e9464 (diff) |
doc: Make fromStdVariant() appear in the QVariant docs
This function was not appearing in the QVariant docs because the \fn command
was wrong and because clang was not seeing the declaration in qvariant.h in
the first place. With this update, the function does appear in the docs, but
it's signature is not correct because clang can't find a definition for
std::variant<Types...>, which probably means it doesn't have the most recent
declarations in the std namespace.
Change-Id: I7912ff333e5d4a8619461dd3ab7ee34bcd8f2289
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 96299b9eaf..f77831c703 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -3896,7 +3896,7 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p) \sa setValue(), value() */ -/*! \fn static inline QVariant fromStdVariant(const std::variant<T, Types...> &value) +/*! \fn template<typename... Types> QVariant QVariant::fromStdVariant(const std::variant<Types...> &value) \since 5.11 Returns a QVariant with the type and value of the active variant of \a value. If diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index fe1ef1bdfc..7ce4e1a4d8 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -359,7 +359,7 @@ class Q_CORE_EXPORT QVariant static inline QVariant fromValue(const T &value) { return qVariantFromValue(value); } -#if QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L +#if defined(Q_CLANG_QDOC) || (QT_HAS_INCLUDE(<variant>) && __cplusplus >= 201703L) template<typename... Types> static inline QVariant fromStdVariant(const std::variant<Types...> &value) { |