diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-07 07:21:30 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-01-07 07:21:30 (GMT) |
commit | a3c1b0703575ed5fc364011c73dc104ecdb8ef0c (patch) | |
tree | 4e57559b1753c7b1eb3f375aa59eee6ea1108f70 /src/corelib/kernel/qvariant.h | |
parent | f9ffe24a87d67f39bb877224f7e2b6f7b3ad6c02 (diff) | |
parent | 7a5bca82738e6b782047e50a813972eccd928307 (diff) | |
download | Qt-a3c1b0703575ed5fc364011c73dc104ecdb8ef0c.zip Qt-a3c1b0703575ed5fc364011c73dc104ecdb8ef0c.tar.gz Qt-a3c1b0703575ed5fc364011c73dc104ecdb8ef0c.tar.bz2 |
Merge branch '4.6' of ../../4.6 into 4.6
Conflicts:
examples/multimedia/audiodevices/audiodevices.cpp
Diffstat (limited to 'src/corelib/kernel/qvariant.h')
-rw-r--r-- | src/corelib/kernel/qvariant.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index 3c10788..74ff17f 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -458,7 +458,7 @@ inline void qVariantSetValue(QVariant &v, const T &t) //if possible we reuse the current QVariant private const uint type = qMetaTypeId<T>(reinterpret_cast<T *>(0)); QVariant::Private &d = v.data_ptr(); - if (v.isDetached() && (type <= uint(QVariant::Char) || type == d.type)) { + if (v.isDetached() && (type == d.type || (type <= uint(QVariant::Char) && d.type <= uint(QVariant::Char)))) { d.type = type; d.is_null = false; T *old = reinterpret_cast<T*>(d.is_shared ? d.data.shared->ptr : &d.data.ptr); |