From: Aaron Kennedy Date: Thu, 17 May 2012 10:08:48 +0000 (+0100) Subject: QMetaObject::activate() overload that doesn't require a metaobject X-Git-Tag: 071012110112~953 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a605d25ae249fc416f321ec1264b7aa33e15c46f;p=profile%2Fivi%2Fqtbase.git QMetaObject::activate() overload that doesn't require a metaobject This allows QML to emit signals without having to built lazily created metaobjects. Change-Id: If8068fb3cb35d79dc8f3ef79253d9c2eb7c93205 Reviewed-by: Lars Knoll Reviewed-by: Kent Hansen --- diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index ca103f0..02a80a9 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -3293,7 +3293,14 @@ void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_sign int signalOffset; int methodOffset; computeOffsets(m, &signalOffset, &methodOffset); + activate(sender, methodOffset, signalOffset, local_signal_index, argv); +} +/*!\internal + */ +void QMetaObject::activate(QObject *sender, int methodOffset, int signalOffset, int local_signal_index, + void **argv) +{ int signal_index = signalOffset + local_signal_index; if (sender->d_func()->declarativeData && QAbstractDeclarativeData::signalEmitted) diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 567157b..66c19fc 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -356,6 +356,7 @@ struct Q_CORE_EXPORT QMetaObject // internal index-based signal activation static void activate(QObject *sender, int signal_index, void **argv); static void activate(QObject *sender, const QMetaObject *, int local_signal_index, void **argv); + static void activate(QObject *sender, int method_offset, int signal_offset, int local_signal_index, void **argv); static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType,