diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2011-12-10 10:53:39 +0100 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2015-01-13 17:52:14 +0100 |
commit | 14583137ae445fbfdc82922266f5c0736454f6c4 (patch) | |
tree | 6fdb1e07eb10f6ee9e389ad7cd3b5cecfd105211 /tests/auto/corelib/kernel/qobject/tst_qobject.cpp | |
parent | 74443d7bbb319e949928dd081fde04bccb5f7845 (diff) |
Introduce Q_ENUM and Q_FLAG macros
In replacement for Q_ENUMS and Q_FLAGS.
Q_ENUM(Foo) has to be put after the declaration of Foo in an object.
It will tell moc to include the enum in the meta object (just like
Q_ENUMS) and will allow templated code to get the metaobject for
that enum.
Will be used by QDebug and QMetaType
Change-Id: Iefaf8ae07dc0359828102bf384809346629b3e23
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/kernel/qobject/tst_qobject.cpp')
-rw-r--r-- | tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 83cdde5aa4..e5891658bb 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -1502,7 +1502,6 @@ typedef QString CustomString; class PropertyObject : public QObject { Q_OBJECT - Q_ENUMS(Alpha Priority) Q_PROPERTY(Alpha alpha READ alpha WRITE setAlpha) Q_PROPERTY(Priority priority READ priority WRITE setPriority) @@ -1564,6 +1563,9 @@ private: float m_float; qreal m_qreal; CustomString m_customString; + + Q_ENUM(Alpha) + Q_ENUM(Priority) }; Q_DECLARE_METATYPE(PropertyObject::Priority) |