diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-20 09:58:20 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-08-20 09:59:44 (GMT) |
commit | 264eb347595cc92a444e3908831d89acef1f05b3 (patch) | |
tree | b00fe745eb671ff1a245e9714dcb3a169d0e13c0 /src | |
parent | dd5877fe48d647f1da20995c4d833d76ed43fd84 (diff) | |
download | Qt-264eb347595cc92a444e3908831d89acef1f05b3.zip Qt-264eb347595cc92a444e3908831d89acef1f05b3.tar.gz Qt-264eb347595cc92a444e3908831d89acef1f05b3.tar.bz2 |
Fix QVariant::toFloat() and QVariant::toReal
Reviewed-by: Thierry
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 54d6073..533ccd7 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2467,7 +2467,7 @@ double QVariant::toDouble(bool *ok) const */ float QVariant::toFloat(bool *ok) const { - return qNumVariantToHelper<float>(d, handler, ok, d.data.d); + return qNumVariantToHelper<float>(d, handler, ok, d.data.f); } /*! @@ -2484,7 +2484,7 @@ float QVariant::toFloat(bool *ok) const */ qreal QVariant::toReal(bool *ok) const { - return qNumVariantToHelper<qreal>(d, handler, ok, d.data.d); + return qNumVariantToHelper<qreal>(d, handler, ok, d.data.real); } /*! diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 79bd5b8..d6a704e 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -358,6 +358,7 @@ class Q_CORE_EXPORT QVariant bool b; double d; float f; + qreal real; qlonglong ll; qulonglong ull; QObject *o; |