From 99d3a9cad689cf635a4bd16711a9d6a6017eea7d Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 28 Apr 2009 13:07:11 +0200 Subject: Compile Warnings removed in canConvert These were caused by a comparison between QVariant::Type and QMetaType::Type. We're using QMetaType::Float because QVariant have no such Float value Reviewed-by: denis --- src/corelib/kernel/qvariant.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index ff59540..b53e91f 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2558,10 +2558,11 @@ static const quint32 qCanConvertMatrix[QVariant::LastCoreType + 1] = bool QVariant::canConvert(Type t) const { //we can treat floats as double - //the reason for not doing it the "proper" way is that QMetaTye Float's value is 135, + //the reason for not doing it the "proper" way is that QMetaType::Float's value is 135, //which can't be handled by qCanConvertMatrix + //In addition QVariant::Type doesn't have a Float value, so we're using QMetaType::Float const uint currentType = ((d.type == QMetaType::Float) ? QVariant::Double : d.type); - if (t == QMetaType::Float) t = QVariant::Double; + if (uint(t) == uint(QMetaType::Float)) t = QVariant::Double; if (currentType == uint(t)) return true; -- cgit v0.12