diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-04-16 14:40:02 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-04-16 15:08:18 +0200 |
commit | 7dc0de374300d66ed72f15820a4ebb78849ae0e7 (patch) | |
tree | 823049ef553f3a2261bcfe73f979d2352edbee7f /src/qml/qml/qqml.h | |
parent | 2cefb096768b1d8d30b4d0705a622f1c7d041344 (diff) |
Make qdoc generate the documentation for qmlRegisterSingletonType
I *guess* it wasn't find the "dummy" signature spelled in the docs,
but only the actual one (with SFINAE), so the overload ended up
being undocumented.
Change-Id: I3c48057860c83dc78107e87b93616415976e802f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqml.h')
-rw-r--r-- | src/qml/qml/qqml.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index b2bf1f328f..a8042a9cad 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -658,10 +658,15 @@ inline int qmlRegisterSingletonType(const char *uri, int versionMajor, int versi return QQmlPrivate::qmlregister(QQmlPrivate::SingletonRegistration, &api); } +#ifdef Q_QDOC +template <typename T> +int qmlRegisterSingletonType(const char *uri, int versionMajor, int versionMinor, const char *typeName, std::function<QObject*(QQmlEngine *, QJSEngine *)> callback) +#else template <typename T, typename F, typename std::enable_if<std::is_convertible<F, std::function<QObject *(QQmlEngine *, QJSEngine *)>>::value && !std::is_convertible<F, QObject *(*)(QQmlEngine *, QJSEngine *)>::value, void>::type* = nullptr> inline int qmlRegisterSingletonType(const char *uri, int versionMajor, int versionMinor, const char *typeName, F&& callback) +#endif { QML_GETTYPENAMES |