|
Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
|
Capturing the arguments of a signal emission. More...
Classes | |
| class | Guard |
| Sets recording() for its lifetime, if it wasn't set already. More... | |
Functions | |
| QVariantList | arguments (const QMetaMethod &signal, void *const *argv) |
Copies the arguments of an emission of signal, which are argv[1..n]. | |
| QJsonArray | toJson (const QVariantList &args, QStringList *texts) |
Converts what arguments() captured to JSON; texts receives each one as text. | |
| bool & | recording () |
| Set while this thread records an emission, so the signals that recording emits (the event machinery's own) aren't recorded in turn. | |
Capturing the arguments of a signal emission.
| QVariantList Sonde::SignalCapture::arguments | ( | const QMetaMethod & | signal, |
| void *const * | argv ) |
Copies the arguments of an emission of signal, which are argv[1..n].
Called on the emitting thread, while the arguments are valid. QObject pointers are kept as QPointer<QObject>: by the time they are described, on the main thread, the object may be gone. destroyed(QObject*)'s argument, the object whose destructor is running, is kept as its id only.