Fix signal offset in dynamic sig param lookup
authorChris Adams <christopher.adams@nokia.com>
Mon, 20 Aug 2012 02:37:42 +0000 (12:37 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 22 Aug 2012 04:01:23 +0000 (06:01 +0200)
Related to 4317c442fd492121e2fc037a39b40653bbc34294

Change-Id: I6aa505b9dc13813d4996c0b5761e9c3e5eea0292
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/qml/qml/qqmlcompiler.cpp

index 3805e98..ec1d19d 100644 (file)
@@ -2942,9 +2942,8 @@ bool QQmlCompiler::buildDynamicMeta(QQmlScript::Object *obj, DynamicMetaMode mod
     while ((parentCache = parentCache->parent())) {
         if (int pSigCount = parentCache->signalCount()) {
             int pSigOffset = parentCache->signalOffset();
-            for (int i = 0; i < pSigCount; ++i) {
-                QQmlPropertyData *currPSig = parentCache->signal(pSigOffset+i);
-                if (!currPSig) continue;
+            for (int i = pSigOffset; i < pSigCount; ++i) {
+                QQmlPropertyData *currPSig = parentCache->signal(i);
                 // XXX TODO: find a better way to get signal name from the property data :-/
                 for (QQmlPropertyCache::StringCache::ConstIterator iter = parentCache->stringCache.begin();
                         iter != parentCache->stringCache.end(); ++iter) {