aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/qmlfunctions.qdoc
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2020-12-14 12:51:43 +0100
committerMaximilian Goldstein <max.goldstein@qt.io>2020-12-15 16:07:27 +0100
commit1c438d4c319f5b3f2e41a42d654e3a8fc8c2efeb (patch)
tree5beb518c06e34e200be8044dcd21d4679c43c5ca /src/qml/doc/src/qmlfunctions.qdoc
parent428cfe2ffd54f8ac03b4acf259de58b7d4fa704f (diff)
qmlfunctions.doc: Improve qmlRegisterSingleton documentation
Reflect that qmlRegisterSingleton can't be used in conjunction with QML_SINGLETON. Change-Id: Ie7b2fd4f6fa5cb29806a212c284781799b796a32 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/doc/src/qmlfunctions.qdoc')
-rw-r--r--src/qml/doc/src/qmlfunctions.qdoc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/doc/src/qmlfunctions.qdoc b/src/qml/doc/src/qmlfunctions.qdoc
index 01ce96167f..eb7983d077 100644
--- a/src/qml/doc/src/qmlfunctions.qdoc
+++ b/src/qml/doc/src/qmlfunctions.qdoc
@@ -186,10 +186,7 @@
factory function of the signature \c{T *create(QQmlEngine *, QJSEngine *)}
when the type is first accessed. If both do exist and are accessible, the
default constructor is preferred. If there is no default constructor and no
- factory function the singleton is initially inaccessible. This behavior can be
- overridden by calling \l qmlRegisterSingletonType() with a specific (external)
- factory function or \l qmlRegisterSingletonInstance() with a specific instance
- for the same class and the same type namespace and version.
+ factory function the singleton is initially inaccessible.
\sa QML_ELEMENT, QML_NAMED_ELEMENT(), qmlRegisterSingletonInstance().
*/
@@ -1005,6 +1002,8 @@
\l {qmlRegisterSingletonType}. See \l{Threads and QObjects} for more
information about thread safety.
+ \b{NOTE:} qmlRegisterSingleton can only be used when all types of that module are registered procedurally.
+
Usage:
\code
// First, define your QObject which provides the functionality.