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 <lars.knoll@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
This commit is contained in:
parent
a5972f8ec3
commit
a605d25ae2
@ -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)
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user