From d2e3f2a79a2f8cae66a94bbd2d16f92171455a8d Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Wed, 20 May 2009 12:46:18 +0200 Subject: allow to debug QVariant of float type Reviewed-by: ogoffart --- src/corelib/kernel/qvariant.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index b504604..2ff9818 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -1021,7 +1021,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result, #if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM) static void streamDebug(QDebug dbg, const QVariant &v) { - switch (v.type()) { + switch (v.userType()) { case QVariant::Int: dbg.nospace() << v.toInt(); break; @@ -1034,6 +1034,9 @@ static void streamDebug(QDebug dbg, const QVariant &v) case QVariant::ULongLong: dbg.nospace() << v.toULongLong(); break; + case QMetaType::Float: + dbg.nospace() << qVariantValue(v); + break; case QVariant::Double: dbg.nospace() << v.toDouble(); break; -- cgit v0.12