Add support for resolving translation bindings at compile time
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 6 Mar 2014 15:19:42 +0000 (16:19 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 11 Mar 2014 17:31:21 +0000 (18:31 +0100)
commit914b72418b7e766026f2679254fcee93fc920866
tree202634bd203c830ddc7eeb7dab1d071ca506b8a3
parentaf7ba8a6194b83fe7380b8d4ae027e2f04e21f17
Add support for resolving translation bindings at compile time

Simple calls to qsTr and qsTrId are detected at type compile time and
reduced to a special Translation and TranslationById binding type, which
avoids allocating a QML binding at type instantiation type just to perform
a translation.

Change-Id: I61e4f2db2a8092b5e6870e174b832d9c20cd62b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
13 files changed:
src/qml/compiler/qqmlcodegenerator_p.h
src/qml/compiler/qqmltypecompiler.cpp
src/qml/compiler/qqmltypecompiler_p.h
src/qml/compiler/qv4compileddata.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/compiler/qv4jsir_p.h
src/qml/qml/qqmlobjectcreator.cpp
src/qml/qml/qqmltypeloader_p.h
src/qml/types/qqmllistmodel.cpp
src/quick/util/qquickpropertychanges.cpp
tests/auto/qml/qml.pro
tests/auto/qml/qqmltranslation/data/translation.qml
tests/auto/qml/qqmltranslation/tst_qqmltranslation.cpp