diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2020-12-14 12:51:43 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-12-15 16:07:27 +0100 |
commit | 1c438d4c319f5b3f2e41a42d654e3a8fc8c2efeb (patch) | |
tree | 5beb518c06e34e200be8044dcd21d4679c43c5ca /src | |
parent | 428cfe2ffd54f8ac03b4acf259de58b7d4fa704f (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')
-rw-r--r-- | src/qml/doc/src/qmlfunctions.qdoc | 7 |
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. |