summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-03 21:55:22 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-03 21:55:22 (GMT)
commita3e6d144cdf03e67b6533c34b450f950a8427372 (patch)
treefb25ac3369eb25daa6978fbbb57fc396930702e3 /src/corelib
parent9b3c0bfb17600afff73294f4e549e0629709cfe0 (diff)
parenta4d7572059b5b56d49d7e0c3f3466686e1dc6e16 (diff)
downloadQt-a3e6d144cdf03e67b6533c34b450f950a8427372.zip
Qt-a3e6d144cdf03e67b6533c34b450f950a8427372.tar.gz
Qt-a3e6d144cdf03e67b6533c34b450f950a8427372.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: 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')
-rw-r--r--src/corelib/kernel/qvariant.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index e1b5825..95b2352 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -466,7 +466,8 @@ 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);
return a_ptr == b_ptr;