Fix most of the declarative bindings failing on ARM.
authorJani Uusi-Rantala <jani.uusi-rantala@nokia.com>
Tue, 1 Nov 2011 19:30:55 +0000 (21:30 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 1 Nov 2011 19:42:28 +0000 (20:42 +0100)
There was a mismatch between 32 and 64-bit integers which
caused a lot of qdeclarative unit tests to fail and QML to
generally not work properly on ARM.

All of the failing auto tests pass now on ARMV7.

Change-Id: Icf230f79e56c15743c6ee943859ac02e649a6e0a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>

src/declarative/qml/qdeclarativedata_p.h
src/declarative/qml/qdeclarativeengine.cpp

index 1bebee5..a497257 100644 (file)
@@ -187,7 +187,7 @@ QDeclarativeNotifierEndpoint *QDeclarativeData::notify(int index)
 {
     Q_ASSERT(index <= 0xFFFF);
 
-    if (!notifyList || !(notifyList->connectionMask & (1 << (quint64(index) % 64)))) {
+    if (!notifyList || !(notifyList->connectionMask & (1ULL << quint64(index % 64)))) {
         return 0;
     } else if (index < notifyList->notifiesSize) {
         return notifyList->notifies[index];
index 50b5db8..86c944f 100644 (file)
@@ -1114,7 +1114,7 @@ void QDeclarativeData::addNotify(int index, QDeclarativeNotifierEndpoint *endpoi
     Q_ASSERT(!endpoint->isConnected());
 
     index = qMin(index, 0xFFFF - 1);
-    notifyList->connectionMask |= (1 << (quint64(index) % 64));
+    notifyList->connectionMask |= (1ULL << quint64(index % 64));
 
     if (index < notifyList->notifiesSize) {