diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-27 12:48:39 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-10-27 12:50:59 (GMT) |
commit | 8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff (patch) | |
tree | 94d225b9bff326b68d1dfa9927a4981ea5f6c604 /src/corelib/kernel | |
parent | d683fd25512dedacdac141222db36209ef65e42d (diff) | |
download | Qt-8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff.zip Qt-8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff.tar.gz Qt-8f040ea4da93f1b9cae1db560e5e9f9b3140b3ff.tar.bz2 |
QVariant::isNull does not return the right result with QVariant::setValue
Inspired by merge request 1911
Reveiwed-by: Thierry
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qvariant.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index eb4fb56..4cce529 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -460,6 +460,7 @@ inline void qVariantSetValue(QVariant &v, const T &t) QVariant::Private &d = v.data_ptr(); if (v.isDetached() && (type <= int(QVariant::Char) || type == d.type)) { d.type = type; + d.is_null = false; T *old = reinterpret_cast<T*>(d.is_shared ? d.data.shared->ptr : &d.data.ptr); if (QTypeInfo<T>::isComplex) old->~T(); |