aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqml.h
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-03-20 01:00:59 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-03-20 01:00:59 +0100
commit1eef06e64fe91dc1f2148477fb932b293fba0312 (patch)
tree38a9a2de87bec5e6a45c090ea086f978421bb554 /src/qml/qml/qqml.h
parent4b0034a01c360ac8b17c9503dba010c56a307c63 (diff)
parentf726d237277de0f4c8f276d20a5bb1b6a8cd007c (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/qml/qml/qqml.h')
-rw-r--r--src/qml/qml/qqml.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqml.h b/src/qml/qml/qqml.h
index 7404a62d23..524af7181c 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -736,9 +736,14 @@ 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::SingletonFunctor registrationFunctor;
registrationFunctor.m_object = cppObject;