diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-04-28 11:07:11 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-04-28 11:09:44 (GMT) |
commit | 99d3a9cad689cf635a4bd16711a9d6a6017eea7d (patch) | |
tree | 643b3d6e91652b6f38ca442b13f6500367d48cd8 /src/corelib/kernel | |
parent | 97d3f5aaccf3a9efa40682fc4958b388b8be99d1 (diff) | |
download | Qt-99d3a9cad689cf635a4bd16711a9d6a6017eea7d.zip Qt-99d3a9cad689cf635a4bd16711a9d6a6017eea7d.tar.gz Qt-99d3a9cad689cf635a4bd16711a9d6a6017eea7d.tar.bz2 |
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
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 5 |
1 files 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; |