Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.1
-
None
-
-
2ed4fcca196ac3fd34a3e41f2e0b3d346a5470b9 (qt/qtbase/5.12)
Description
I got this error message when I moved one of my enums into a namespace:
Qt/5.12.1/gcc_64/include/QtCore/qglobal.h:121: error: static assertion failed: QMetaEnum::fromType only works with enums declared as Q_ENUM or Q_FLAG
# define Q_STATIC_ASSERT_X(Condition, Message) static_assert(bool(Condition), Message)
^
I had to look online to discover that since 5.8, you have new macros:
Q_NAMESPACE Q_ENUM_NS
So you should update the error:
qglobal.h:121: error: static assertion failed: QMetaEnum::fromType only works with enums declared as Q_ENUM, Q_FLAG, Q_ENUM_NS
Attachments
For Gerrit Dashboard: QTBUG-75829 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
261763,3 | Update QMetaEnum::fromType()'s static assert's error message | 5.12 | qt/qtbase | Status: MERGED | +2 | 0 |