diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index baef75b234..16bb140228 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -1028,7 +1028,6 @@ void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, int value) #ifndef QT_NO_QOBJECT /*! - \fn QDebug qt_QMetaEnum_debugOperator(QDebug &, int value, const QMetaObject *, const char *name) \internal Formats the given enum \a value for debug output. @@ -1075,7 +1074,7 @@ QDebug qt_QMetaEnum_debugOperator(QDebug &dbg, qint64 value, const QMetaObject * dbg << scope << u"::"; } - const char *key = me.valueToKey(value); + const char *key = me.valueToKey(static_cast(value)); const bool scoped = me.isScoped() || verbosity & 1; if (scoped || !key) dbg << me.enumName() << (!key ? u"(" : u"::"); @@ -1144,7 +1143,7 @@ QDebug qt_QMetaEnum_flagDebugOperator(QDebug &debug, quint64 value, const QMetaO debug << '('; } - debug << me.valueToKeys(value); + debug << me.valueToKeys(static_cast(value)); if (enumScope) debug << ')'; diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 139c4ec776..4006b348e1 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -1951,13 +1951,13 @@ static bool convertFromEnum(QMetaType fromType, const void *from, QMetaType toTy QMetaEnum en = metaEnumFromType(fromType); if (en.isValid()) { if (en.isFlag()) { - const QByteArray keys = en.valueToKeys(ll); + const QByteArray keys = en.valueToKeys(static_cast(ll)); if (toType.id() == QMetaType::QString) *static_cast(to) = QString::fromUtf8(keys); else *static_cast(to) = keys; } else { - const char *key = en.valueToKey(ll); + const char *key = en.valueToKey(static_cast(ll)); if (toType.id() == QMetaType::QString) *static_cast(to) = QString::fromUtf8(key); else