Port QSignalEventGenerator meta-object to revision 6

We want to drop support for old revisions in Qt 5.

This commit brings the QSignalEventGenerator meta-object in sync with
current moc output.

Change-Id: Id5f4954b08cf49169850bd77543b2a7ab8274c18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
Kent Hansen 2012-02-18 21:15:45 +01:00 committed by Qt by Nokia
parent 989670737f
commit f83724a0f2
2 changed files with 44 additions and 23 deletions

View File

@ -61,13 +61,13 @@ class QStateMachine;
class QSignalEventGenerator : public QObject
{
Q_OBJECT_FAKE
public:
QSignalEventGenerator(QStateMachine *parent);
static const QMetaObject staticMetaObject;
virtual const QMetaObject *metaObject() const;
virtual void *qt_metacast(const char *);
virtual int qt_metacall(QMetaObject::Call, int, void **argv);
private:
// slots
void execute(void **_a);
private:
Q_DISABLE_COPY(QSignalEventGenerator)

View File

@ -2210,16 +2210,19 @@ void QStateMachine::removeDefaultAnimation(QAbstractAnimation *animation)
#endif // QT_NO_ANIMATION
// Begin moc-generated code -- modify carefully (check "HAND EDIT" parts)!
static const uint qt_meta_data_QSignalEventGenerator[] = {
// content:
2, // revision
6, // revision
0, // classname
0, 0, // classinfo
1, 12, // methods
1, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: signature, parameters, type, tag, flags
23, 22, 22, 22, 0x0a,
@ -2231,9 +2234,26 @@ static const char qt_meta_stringdata_QSignalEventGenerator[] = {
"QSignalEventGenerator\0\0execute()\0"
};
void QSignalEventGenerator::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
QSignalEventGenerator *_t = static_cast<QSignalEventGenerator *>(_o);
switch (_id) {
case 0: _t->execute(_a); break; // HAND EDIT: add the _a parameter
default: ;
}
}
Q_UNUSED(_a);
}
const QMetaObjectExtraData QSignalEventGenerator::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject QSignalEventGenerator::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_QSignalEventGenerator,
qt_meta_data_QSignalEventGenerator, 0 }
qt_meta_data_QSignalEventGenerator, &staticMetaObjectExtraData }
};
const QMetaObject *QSignalEventGenerator::metaObject() const
@ -2255,26 +2275,27 @@ int QSignalEventGenerator::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: {
// ### in Qt 4.6 we can use QObject::senderSignalIndex()
QObjectPrivate *d = static_cast<QObjectPrivate *>(d_ptr.data());
int signalIndex = -1;
QObject *sender = this->sender();
if (sender && d->currentSender)
signalIndex = d->currentSender->signal;
Q_ASSERT(signalIndex != -1);
QStateMachine *machine = qobject_cast<QStateMachine*>(parent());
QStateMachinePrivate::get(machine)->handleTransitionSignal(sender, signalIndex, _a);
break;
}
default: ;
}
if (_id < 1)
qt_static_metacall(this, _c, _id, _a);
_id -= 1;
}
return _id;
}
// End moc-generated code
void QSignalEventGenerator::execute(void **_a)
{
// ### in Qt 4.6 we can use QObject::senderSignalIndex()
QObjectPrivate *d = static_cast<QObjectPrivate *>(d_ptr.data());
int signalIndex = -1;
QObject *sender = this->sender();
if (sender && d->currentSender)
signalIndex = d->currentSender->signal;
Q_ASSERT(signalIndex != -1);
QStateMachine *machine = qobject_cast<QStateMachine*>(parent());
QStateMachinePrivate::get(machine)->handleTransitionSignal(sender, signalIndex, _a);
}
QSignalEventGenerator::QSignalEventGenerator(QStateMachine *parent)
: QObject(parent)