diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-06-04 16:10:34 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-22 10:04:44 +0200 |
commit | 15fd9d0c230680255b523b0409c0eb946d7a785f (patch) | |
tree | 245fad57aabf9ea604f2e809a8ac9873d6c22295 /src/quick/items/qquickvisualadaptormodel.cpp | |
parent | 836bade8766f7de2104b1a91b10cbc2a08d12c03 (diff) |
Pass the right signal index in visualadaptormodel proxy meta-object
For QMetaObject::activate(), the index must be relative to the
class's own signals (excluding non-signal methods).
For QMetaObjectBuilder, the notifier index must be relative to the
class's own methods.
Change-Id: I22f55d1fc55d56c997135dc78f51b710b37bb01a
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src/quick/items/qquickvisualadaptormodel.cpp')
-rw-r--r-- | src/quick/items/qquickvisualadaptormodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquickvisualadaptormodel.cpp b/src/quick/items/qquickvisualadaptormodel.cpp index 4151c3695e..b15513eed2 100644 --- a/src/quick/items/qquickvisualadaptormodel.cpp +++ b/src/quick/items/qquickvisualadaptormodel.cpp @@ -882,7 +882,7 @@ public: QMetaObject::metacall(m_data->object, call, id - m_type->propertyOffset + objectPropertyOffset, arguments); return -1; } else if (id >= m_type->signalOffset && call == QMetaObject::InvokeMetaMethod) { - QMetaObject::activate(m_data, this, id, 0); + QMetaObject::activate(m_data, this, id - m_type->signalOffset, 0); return -1; } else { return m_data->qt_metacall(call, id, arguments); @@ -910,7 +910,7 @@ public: } const int previousMethodCount = methodCount(); - int notifierId = previousMethodCount; + int notifierId = previousMethodCount - methodOffset(); for (int propertyId = previousPropertyCount; propertyId < metaObject->propertyCount() - objectPropertyOffset; ++propertyId) { QMetaProperty property = metaObject->property(propertyId + objectPropertyOffset); QMetaPropertyBuilder propertyBuilder; |