summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-05-15 11:33:57 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-05-15 11:42:22 +0200
commit2ed4fcca196ac3fd34a3e41f2e0b3d346a5470b9 (patch)
tree6895d21af09af2261360eb9e1f897747b9647870
parent6fb2b4b271dba6f8b47bf66c50b30ce6df567178 (diff)
Update QMetaEnum::fromType()'s static assert's error message
QMetaEnum fromType() also works for enums declared with Q_{ENUM,FLAG}_NS. This hadn't been added to the message when we added Q_{ENUM,FLAG}_NS. Fixes: QTBUG-75829 Change-Id: Ib71dae83dd8d837adf46b73cd299b8e61bdb1f64 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/kernel/qmetaobject.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h
index 51ace3d5f7..1efb49017f 100644
--- a/src/corelib/kernel/qmetaobject.h
+++ b/src/corelib/kernel/qmetaobject.h
@@ -230,7 +230,8 @@ public:
template<typename T> static QMetaEnum fromType() {
Q_STATIC_ASSERT_X(QtPrivate::IsQEnumHelper<T>::Value,
- "QMetaEnum::fromType only works with enums declared as Q_ENUM or Q_FLAG");
+ "QMetaEnum::fromType only works with enums declared as "
+ "Q_ENUM, Q_ENUM_NS, Q_FLAG or Q_FLAG_NS");
const QMetaObject *metaObject = qt_getEnumMetaObject(T());
const char *name = qt_getEnumName(T());
return metaObject->enumerator(metaObject->indexOfEnumerator(name));