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-04-20 23:37:31 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-04-20 23:37:32 +0200
commitcdc6c2164a80311979a6c247d6fb77d436612e5f (patch)
treec0f15469440d862f0ff8e775d7804278811d0133 /src/qml/qml/qqml.h
parentac9046b074a60ab73d7e76a48b8c69f00db9cbd2 (diff)
parent7dc0de374300d66ed72f15820a4ebb78849ae0e7 (diff)
Merge remote-tracking branch 'origin/5.14' into 5.15
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 4adf100a1f..1621e3c02e 100644
--- a/src/qml/qml/qqml.h
+++ b/src/qml/qml/qqml.h
@@ -735,10 +735,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