summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-05-20 10:46:18 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-05-20 14:22:27 (GMT)
commitd2e3f2a79a2f8cae66a94bbd2d16f92171455a8d (patch)
tree65ce99fde7be05e93cd04a4d601ae658e470e1af /src
parentafa4bcc90f79f3a68bed3f3429f2515fc8c7d23d (diff)
downloadQt-d2e3f2a79a2f8cae66a94bbd2d16f92171455a8d.zip
Qt-d2e3f2a79a2f8cae66a94bbd2d16f92171455a8d.tar.gz
Qt-d2e3f2a79a2f8cae66a94bbd2d16f92171455a8d.tar.bz2
allow to debug QVariant of float type
Reviewed-by: ogoffart
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qvariant.cpp5
1 files changed, 4 insertions, 1 deletions
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<float>(v);
+ break;
case QVariant::Double:
dbg.nospace() << v.toDouble();
break;