summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-06-26 08:56:28 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-06-26 08:56:28 (GMT)
commit0bbd4db2eed7092c58c36867033fc21d8b86bcd9 (patch)
treef47b347072e72a2b241ad1e2846bef03bd927015 /src/corelib/kernel
parent36d6dc5666b102d8401daa01243b4736203f8848 (diff)
parent9ac5755fb53387a79e5d9c007501800ab9963bed (diff)
downloadQt-0bbd4db2eed7092c58c36867033fc21d8b86bcd9.zip
Qt-0bbd4db2eed7092c58c36867033fc21d8b86bcd9.tar.gz
Qt-0bbd4db2eed7092c58c36867033fc21d8b86bcd9.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r--src/corelib/kernel/qvariant.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h
index 6844d3e..e923844 100644
--- a/src/corelib/kernel/qvariant.h
+++ b/src/corelib/kernel/qvariant.h
@@ -448,7 +448,7 @@ inline void qVariantSetValue(QVariant &v, const T &t)
//if possible we reuse the current QVariant private
const int type = qMetaTypeId<T>(reinterpret_cast<T *>(0));
QVariant::Private &d = v.data_ptr();
- if (type <= int(QVariant::Char) || (type == d.type && v.isDetached())) {
+ if (v.isDetached() && (type <= int(QVariant::Char) || type == d.type)) {
d.type = type;
T *old = reinterpret_cast<T*>(d.is_shared ? d.data.shared->ptr : &d.data.ptr);
if (QTypeInfo<T>::isComplex)