summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2018-07-24 16:24:58 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-07-24 16:25:13 +0000
commit5d0827cbe712ae6d49d1232c712227fe3d56b964 (patch)
tree4e9e2e60432d32e6a035897128c8f1ce43dc4336 /src/corelib/io/qdebug_p.h
parent549abf9e6a1e191f98e5b7ae69647c19429a6469 (diff)
formatQEnum: deal with enum class types
The enum class doesn't get treated as an int automatically, the way that a plain enum does; so there's a silly compile error which this cast fixes. Change-Id: I21b56337e4f724e4de1819e22bc93e9af23c51ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qdebug_p.h')
-rw-r--r--src/corelib/io/qdebug_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qdebug_p.h b/src/corelib/io/qdebug_p.h
index a1887655d2..dcb906d156 100644
--- a/src/corelib/io/qdebug_p.h
+++ b/src/corelib/io/qdebug_p.h
@@ -93,7 +93,7 @@ static inline void formatQEnum(QDebug &debug, QEnum value)
{
const QMetaObject *metaObject = qt_getEnumMetaObject(value);
const QMetaEnum me = metaObject->enumerator(metaObject->indexOfEnumerator(qt_getEnumName(value)));
- if (const char *key = me.valueToKey(value))
+ if (const char *key = me.valueToKey(int(value)))
debug << key;
else
debug << int(value);