Add a new variant of qmlRegisterSingletonType for QML singletons.
authorAntti Piira <apiira@blackberry.com>
Mon, 28 Oct 2013 23:17:36 +0000 (16:17 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 9 Nov 2013 21:46:47 +0000 (22:46 +0100)
commit7b75c3e63e7842c2667f58d43d44e21ff57ac0c8
tree2aa1ade5d31c099170b65b8b618257bf330321dd
parentbed4d0de7e4bf57dd70e44be28eb361b4f4fe9e2
Add a new variant of qmlRegisterSingletonType for QML singletons.

Adds a new public API to register a QML based singleton type from
C++. This is the equivalent of the the qmlRegisterType, but for
singletons. qmldir file is not needed for types registered through
this function, but the type still needs to include the following
pragma statement among the import statements:

pragma Singleton

Change-Id: Icb35b665fe2a8605667fe8ac575347be2a60490c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/doc/src/qmlfunctions.qdoc
src/qml/qml/qqml.h
tests/auto/qml/qqmllanguage/data/singleton/RegisteredCompositeSingletonType.qml [new file with mode: 0644]
tests/auto/qml/qqmllanguage/data/singletonTest17.qml [new file with mode: 0644]
tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp