[new compiler] Add support for implicitly defined components
authorSimon Hausmann <simon.hausmann@digia.com>
Tue, 7 Jan 2014 14:35:20 +0000 (15:35 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 10 Jan 2014 09:26:43 +0000 (10:26 +0100)
commit5c40193f8223a8bdefcf694c719396807a83f0ea
tree626991eb96b9da976cf0ebe6c944012e81effe0b
parentb681bd3e4ad20eb558da68ba1a2e2dfddfab9cf1
[new compiler] Add support for implicitly defined components

Use-cases like

    itemDelegate: Item { ... }

implicitly define a component without the item-surrounding Component {}, base
on the fact that the property itself is of type QQmlComponent (or derived).

This means we have to synthesize a Component {} object and insert it into
the data structure.

Change-Id: I8992451a5a6732c7fd898eaf83c276dc6a8b7d19
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qqmlcodegenerator.cpp
src/qml/compiler/qqmlcodegenerator_p.h
src/qml/compiler/qqmltypecompiler.cpp
src/qml/compiler/qqmltypecompiler_p.h
src/qml/parser/qqmljsmemorypool_p.h
src/qml/qml/qqmlobjectcreator.cpp
src/qml/qml/qqmlobjectcreator_p.h