Add support CompositeSingleton to the new V4 compiler.
authorAntti Piira <apiira@blackberry.com>
Tue, 24 Sep 2013 19:49:10 +0000 (12:49 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 21 Oct 2013 19:43:32 +0000 (21:43 +0200)
commit9de3630a513aa598855f7d40461c5aec9ecce319
tree69eb5b78efbfe6cba7b7266a9adbe0e2bce77336
parentde31a57672ec461c2081f65e3631134ee45de887
Add support CompositeSingleton to the new V4 compiler.

Implements QQmlCodeGenerator::visit(AST::UiPragma *) to process any
pragma statements in a QML file for the new V4 compiler approach.
Only pragma Singleton is supported, others will generate errors.

Also adds necessary hooks to treat types as Singletons. Basic
functionality is working, but three of the QML Singleton unit tests
fail. Some of them are dependent on other language capabilities that
seem to have problems.

In addition removes unnecessary toString() call in the equivalent
visit(AST::UiPragma *) function of the old parser.

Change-Id: Iec9fa887f953b80b7f9a11878d846637a8f519ef
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/compiler/qqmlcodegenerator.cpp
src/qml/compiler/qqmlcodegenerator_p.h
src/qml/compiler/qv4compileddata_p.h
src/qml/qml/qqmlobjectcreator.cpp
src/qml/qml/qqmlscript.cpp
src/qml/qml/qqmltypeloader.cpp
src/qml/qml/qqmltypeloader_p.h