This change helps keep rules for each language separate by moving `go`
rules to `emitgo` while the C bindings stay closer to the original Qt
naming (that already is mostly C-safe).
Although it doesn't practically matter for go, it makes it slightly
easier to reuse the generated code in other languages which have
different keywords and naming conventions.
The cabi generator also gains a few helpers to help keep names
consistent across files which hopefully aids reading the generator code
- it did for me at least;)
The rule that converts under_score to CamelCase is left for another day
since moving it turns out to be more invasive due to name collision
handling - when underscores are kept, there are fewer name conflicts
which ends up causing name changes in the public go api when done
naively.
Since callback signatures are now generated in C++, might as well go
ahead and retain `const` and the pointer type, removing a `const_cast`
in the process.
The subclassing structure in `miqt` is such that nothing ever inherits
from `MiqtVirtual` - also, for `MiqtVirtual` to work correctly when Qt
deletes an instance part of a tree of widgets, the technique can only be
used with types that already have a virtual destructor.
Therefore:
* make `MiqtVirtual` final to ensure nothing inherits from it by
accident
* remove `virtual` inheritance of its base class - since there is no MI
invonved and no further inheritance, there can also not be any diamond
inheritance structures - removing `virtual` makes inheritance a bit
cheaper
* remove `isSubclass` from `delete` function - C++ already calls the
most inherited destructor
* mark destructor `override` to verify said assumption
Blocked methods are the source of many gaps in the binding - in
particular, they block qt_metacall/activate/etc that is necessary for
implementing meta-object support.
This change makes them visible in logs and also removes log timestamps
so that logs from two runs easily can be diffed.
The expected type of the callback is already known from the AST - this
change reduces dependency on cgo specifics and makes the generated C ABI
entirely cgo-independent - in particular, there is no need to include
`_cgo_export.h` any more.