From b86b2a742afae118bf974c82ba966ddb0cae4afb Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 17 Nov 2014 16:21:58 -0800 Subject: [PATCH] QVariant: Fix qIsNumericType(SChar) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit signed char is a numeric type Change-Id: I5cf9ed63cb7a2ba56c08119c77bcac0f9369b5df Reviewed-by: Jędrzej Nowacki --- src/corelib/kernel/qvariant.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 67911f2836..22e8263f77 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -3139,7 +3139,8 @@ bool QVariant::convert(const int type, void *ptr) const static bool qIsNumericType(uint tp) { return (tp >= QVariant::Bool && tp <= QVariant::Double) - || (tp >= QMetaType::Long && tp <= QMetaType::Float); + || (tp >= QMetaType::Long && tp <= QMetaType::Float) + || tp == QMetaType::SChar; } static bool qIsFloatingPoint(uint tp)