From a0ab037c69821dc2aa8f8bed70dfc6b75bc5b35b Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 17 Apr 2020 17:41:15 +0200 Subject: Generate the docs for qmlRegisterSingletonInstance I think qdoc is once more confused by the mismatch between the actual declaration and the signature in the \fn macro. Change-Id: I25d1be71ffdfc20961e23e06e9132ed09d1e29d0 Reviewed-by: Ulf Hermann --- src/qml/qml/qqml.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h index a8042a9cad..8b7457d471 100644 --- a/src/qml/qml/qqml.h +++ b/src/qml/qml/qqml.h @@ -682,9 +682,13 @@ inline int qmlRegisterSingletonType(const char *uri, int versionMajor, int versi return QQmlPrivate::qmlregister(QQmlPrivate::SingletonRegistration, &api); } +#ifdef Q_QDOC +int qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor, const char *typeName, QObject *cppObject) +#else template inline auto qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor, const char *typeName, T *cppObject) -> typename std::enable_if::value, int>::type +#endif { QQmlPrivate::RegisterSingletonFunctor registrationFunctor; registrationFunctor.m_object = cppObject; -- cgit v1.2.3