|
Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
|
A meta-object with one slot for each traced signal of a class, built at runtime. More...
Static Public Member Functions | |
| static const QMetaObject * | get (const QList< QByteArray > &names) |
The meta-object whose slots are named names, in order. | |
Private Member Functions | |
| SlotMetaObject (const QList< QByteArray > &names) | |
Builds the tables for slots named names. | |
A meta-object with one slot for each traced signal of a class, built at runtime.
Each traced signal is connected to its own slot, so the method index that qt_metacall() receives says which signal fired, from any thread. The slots take no arguments: Qt accepts a slot with fewer arguments than its signal, and a direct connection still hands qt_metacall() the signal's own argv.
The tables are written in the layout moc generates, at revision 12 (Qt 6.8's moc). Later Qt versions must keep reading that revision, since applications built against 6.8 run on them. The technique is the one in Volker Krause's "DIY moc: Dynamic Meta Objects" (Qt Developer Days 2014).
Built meta-objects are kept for the life of the process: Qt 6.8 assumes a meta-object's strings stay where they are (only later versions know the AllocatedMetaObject flag), and QMetaMethod::name() points into them. They are shared by every handler with the same slot names, so there are few.