diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-05-20 10:46:18 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-05-20 14:22:27 (GMT) |
commit | d2e3f2a79a2f8cae66a94bbd2d16f92171455a8d (patch) | |
tree | 65ce99fde7be05e93cd04a4d601ae658e470e1af /src | |
parent | afa4bcc90f79f3a68bed3f3429f2515fc8c7d23d (diff) | |
download | Qt-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.cpp | 5 |
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; |