Add support to moc for registering non-local enums via Q_ENUMS.
authorGlenn Watson <glenn.watson@nokia.com>
Fri, 25 Nov 2011 01:58:37 +0000 (11:58 +1000)
committerQt by Nokia <qt-info@nokia.com>
Sun, 27 Nov 2011 21:51:39 +0000 (22:51 +0100)
commitde9d845441eeb699da85c98d163451bc127fa1de
tree3742721b9ef20feade31b32797aa36199c6469ed
parentff049be0726e020937a0fb8aab92b67d88d25188
Add support to moc for registering non-local enums via Q_ENUMS.

When using the Q_ENUMS macro to register an enumeration in a class
with moc, it's now possible to provide a scoped enumeration that
exists in another class. This adds the enum class scope to
a metaobject's list of related classes stored in the extradata
field.

This allows the declarative code to handle non-local enums in
signal and slot functions that are exposed to QML.

Task-number: QTBUG-20639
Change-Id: I94f5292818095fda75762bd1508ba5c69de19503
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
src/tools/moc/generator.cpp
tests/auto/tools/moc/tst_moc.cpp