mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
genbindings: move QAccessibleWidget hack into standard config
This commit is contained in:
parent
45db3c6bb1
commit
f45604ee13
@ -196,6 +196,24 @@ func AllowVirtual(mm CppMethod) bool {
|
||||
return true // AllowSignal(mm)
|
||||
}
|
||||
|
||||
func AllowVirtualForClass(className string) bool {
|
||||
|
||||
// Allowing the subclassing of QAccessibleWidget compiles fine,
|
||||
// but, always gives a linker error:
|
||||
//
|
||||
// /usr/lib/go-1.19/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
|
||||
// /usr/bin/ld: /tmp/go-link-1745036494/000362.o: in function `MiqtVirtualQAccessibleWidget::MiqtVirtualQAccessibleWidget(QWidget*)':
|
||||
// undefined reference to `vtable for MiqtVirtualQAccessibleWidget'
|
||||
//
|
||||
// An undefined vtable usually indicates that the virtual class is missing
|
||||
// definitions for some virtual methods, but AFAICT we have complete coverage.
|
||||
if className == "QAccessibleWidget" {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func AllowMethod(className string, mm CppMethod) error {
|
||||
|
||||
for _, p := range mm.Parameters {
|
||||
|
@ -413,16 +413,7 @@ func (c *CppClass) VirtualMethods() []CppMethod {
|
||||
return nil
|
||||
}
|
||||
|
||||
// FIXME Allowing the subclassing of QAccessibleWidget compiles fine,
|
||||
// but, always gives a linker error:
|
||||
//
|
||||
// /usr/lib/go-1.19/pkg/tool/linux_amd64/link: running g++ failed: exit status 1
|
||||
// /usr/bin/ld: /tmp/go-link-1745036494/000362.o: in function `MiqtVirtualQAccessibleWidget::MiqtVirtualQAccessibleWidget(QWidget*)':
|
||||
// undefined reference to `vtable for MiqtVirtualQAccessibleWidget'
|
||||
//
|
||||
// An undefined vtable usually indicates that the virtual class is missing
|
||||
// definitions for some virtual methods, but AFAICT we have complete coverage.
|
||||
if c.ClassName == "QAccessibleWidget" {
|
||||
if !AllowVirtualForClass(c.ClassName) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user