summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-12-05 11:20:23 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-12-05 11:20:33 (GMT)
commit291a26abae4b7e1e4b77baf42964ccb77edf4adf (patch)
treec7dfb42a84295438ef163e4975f6af2d88f649cc /src/corelib
parent1bb5999cdca0a70df3f96d596c83c3cf7c97c5fd (diff)
parent33441e2a611f07207b0b942368aab9010cdf8ab1 (diff)
downloadQt-291a26abae4b7e1e4b77baf42964ccb77edf4adf.zip
Qt-291a26abae4b7e1e4b77baf42964ccb77edf4adf.tar.gz
Qt-291a26abae4b7e1e4b77baf42964ccb77edf4adf.tar.bz2
Merge commit '33441e2a611f07207b0b942368aab9010cdf8ab1' of oslo-staging-1/4.6 into 4.6
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/plugin/qlibrary.cpp2
-rw-r--r--src/corelib/tools/qhash.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 6496876..ea0254b 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -744,7 +744,7 @@ bool QLibraryPrivate::isPlugin(QSettings *settings)
pluginState = IsNotAPlugin; // be pessimistic
- if ((qt_version > QT_VERSION) || ((QT_VERSION & 0xff0000) > (qt_version & 0xff0000))) {
+ if ((qt_version & 0x00ff00) > (QT_VERSION & 0x00ff00) || (qt_version & 0xff0000) != (QT_VERSION & 0xff0000)) {
if (qt_debug_component()) {
qWarning("In %s:\n"
" Plugin uses incompatible Qt library (%d.%d.%d) [%s]",
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 1918229..2de03dc 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -69,18 +69,18 @@ inline uint qHash(int key) { return uint(key); }
inline uint qHash(ulong key)
{
if (sizeof(ulong) > sizeof(uint)) {
- return uint((key >> (8 * sizeof(uint) - 1)) ^ key);
+ return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U));
} else {
- return uint(key);
+ return uint(key & (~0U));
}
}
inline uint qHash(long key) { return qHash(ulong(key)); }
inline uint qHash(quint64 key)
{
if (sizeof(quint64) > sizeof(uint)) {
- return uint((key >> (8 * sizeof(uint) - 1)) ^ key);
+ return uint(((key >> (8 * sizeof(uint) - 1)) ^ key) & (~0U));
} else {
- return uint(key);
+ return uint(key & (~0U));
}
}
inline uint qHash(qint64 key) { return qHash(quint64(key)); }