mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-10-26 18:21:27 +00:00
By moving the base fields to a QObjectBase_, QObject can be a type which also has a 'base' field. This allows writing a generic QOBJECT() macro that will work with any QObject type, including QObject itself. The container_of() macro ensures that the object to cast has a QObjectBase_ base field, giving some type safety guarantees. QObject must have no members but QObjectBase_ base, or else QOBJECT() breaks. QObjectBase_ is not a typedef and uses a trailing underscore to make it obvious it is not for normal use and to avoid potential abuse. Backports commit 3d3eacaeccaab718ea0e2ddaa578bfae9e311c59 from qemu |
||
|---|---|---|
| .. | ||
| qmp | ||
| clone-visitor.h | ||
| dealloc-visitor.h | ||
| error.h | ||
| qobject-input-visitor.h | ||
| qobject-output-visitor.h | ||
| string-input-visitor.h | ||
| visitor-impl.h | ||
| visitor.h | ||