Allow literal enum to int property assignments
authorChris Adams <christopher.adams@nokia.com>
Thu, 15 Mar 2012 07:09:13 +0000 (17:09 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 21 Mar 2012 04:18:35 +0000 (05:18 +0100)
commit4c9d326230a2c522bc8fd80eee9664c7d0c1205f
tree3e7e9fcc2a78d852b961b6b2c54ffe8e5c414dd0
parentb2722ab31e524fc223a332fc0574e4b66c716b20
Allow literal enum to int property assignments

Previously, enum to int property assignments were considered bindings.
This commit adds support for assigning enum values to int properties
as enums.

Note that to use an enum in QML, it must have been declared with
Q_ENUMS or otherwise registered as a metatype.  Enum values from the
global Qt object are also usable.

Task-number: QTBUG-23403
Change-Id: I50db6cae54a24400ea472bde43619d547e4ceb78
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/qml/qml/qqmlcompiler.cpp
tests/auto/qml/qqmlecmascript/data/enums.3.qml [new file with mode: 0644]
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp