diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-04 12:30:23 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-04 12:30:23 (GMT) |
commit | 30dba6b22f907ba36ed8f71568ab2489536f8f43 (patch) | |
tree | 37b73324d4871aa41b53dadd4d270f1c2764d699 /src/corelib/kernel/qvariant.cpp | |
parent | 352f9e629666b6a1743fafc42c16bb51a6ad3df9 (diff) | |
parent | f1e39e7dea8634695263435f0bf912ce19c43195 (diff) | |
download | Qt-30dba6b22f907ba36ed8f71568ab2489536f8f43.zip Qt-30dba6b22f907ba36ed8f71568ab2489536f8f43.tar.gz Qt-30dba6b22f907ba36ed8f71568ab2489536f8f43.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Make tablet detection work with new wacom drivers
Fixed an exit crash that could occur in the GL 2 engine under X11.
Fix tst_QVariant::operator_eq_eq(UserType)
SqlBrowser not respecting casings.
Remove vgClearPath() change to OpenVG paint engine
QVariant: Fix crash when comparing two variant with the same undefined type.
Fix compositing when QWS background is completely transparent.
Fixes wrong composition mode for cached backgrounds in Graphics View.
Support keypad input with vnc driver
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index e1b5825..9a278bd 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -466,9 +466,13 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b) * QMetaType::VoidStar, QMetaType::QObjectStar and so forth, is that it wouldn't include * user defined pointer types. */ const char *const typeName = QMetaType::typeName(a->type); - if (typeName[qstrlen(typeName) - 1] == '*') + uint typeNameLen = qstrlen(typeName); + if (typeNameLen > 0 && typeName[typeNameLen - 1] == '*') return *static_cast<void *const *>(a_ptr) == *static_cast<void *const *>(b_ptr); + if (a->is_null && b->is_null) + return true; + return a_ptr == b_ptr; } |