summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-04-17 17:41:15 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-04-24 12:12:55 +0200
commita0ab037c69821dc2aa8f8bed70dfc6b75bc5b35b (patch)
treefff7030bf5eec7bde94d244988756973a5caddf3
parent560bc348d86aba6cef5fdf88bc9d7304dd914bc8 (diff)
Generate the docs for qmlRegisterSingletonInstance5.14
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 <ulf.hermann@qt.io>
-rw-r--r--src/qml/qml/qqml.h4
1 files changed, 4 insertions, 0 deletions
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<typename T>
inline auto qmlRegisterSingletonInstance(const char *uri, int versionMajor, int versionMinor,
const char *typeName, T *cppObject) -> typename std::enable_if<std::is_base_of<QObject, T>::value, int>::type
+#endif
{
QQmlPrivate::RegisterSingletonFunctor registrationFunctor;
registrationFunctor.m_object = cppObject;