Change internal QDeclarativeData hooks to use signal index range
This also changes the qtdeclarative-specific QMetaObject::activate() overload to not take a methodOffset argument, since it's no longer needed. Change-Id: I4f7ece9f43339f3327419598c032e48fb37b97f0 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
This commit is contained in:
parent
69478da0f0
commit
c66dc44968
@ -2184,7 +2184,7 @@ int QObject::receivers(const char *signal) const
|
||||
|
||||
if (d->declarativeData && QAbstractDeclarativeData::receivers) {
|
||||
receivers += QAbstractDeclarativeData::receivers(d->declarativeData, this,
|
||||
metaObject()->indexOfMethod(signal));
|
||||
signal_index);
|
||||
}
|
||||
|
||||
if (!d->isSignalConnected(signal_index))
|
||||
@ -3276,22 +3276,18 @@ static void queued_activate(QObject *sender, int signal, QObjectPrivate::Connect
|
||||
void QMetaObject::activate(QObject *sender, const QMetaObject *m, int local_signal_index,
|
||||
void **argv)
|
||||
{
|
||||
int signalOffset;
|
||||
int methodOffset;
|
||||
computeOffsets(m, &signalOffset, &methodOffset);
|
||||
activate(sender, methodOffset, signalOffset, local_signal_index, argv);
|
||||
activate(sender, QMetaObjectPrivate::signalOffset(m), local_signal_index, argv);
|
||||
}
|
||||
|
||||
/*!\internal
|
||||
*/
|
||||
void QMetaObject::activate(QObject *sender, int methodOffset, int signalOffset, int local_signal_index,
|
||||
void **argv)
|
||||
void QMetaObject::activate(QObject *sender, int signalOffset, int local_signal_index, void **argv)
|
||||
{
|
||||
int signal_index = signalOffset + local_signal_index;
|
||||
|
||||
if (sender->d_func()->declarativeData && QAbstractDeclarativeData::signalEmitted)
|
||||
QAbstractDeclarativeData::signalEmitted(sender->d_func()->declarativeData, sender,
|
||||
methodOffset + local_signal_index, argv);
|
||||
signal_index, argv);
|
||||
|
||||
if (!sender->d_func()->isSignalConnected(signal_index))
|
||||
return; // nothing connected to these signals, and no spy
|
||||
|
@ -348,7 +348,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 void activate(QObject *sender, 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