diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 1b47f969..c39ff30b 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -195,6 +195,15 @@ func AllowSignal(mm CppMethod) bool { } } +func AllowInheritedParent(className string) bool { + // QItemSelection extends a QList<>, but we omit that from the inheritance hierarchy + if strings.HasPrefix(className, `QList<`) { + return false + } + + return true +} + func AllowVirtual(mm CppMethod) bool { if mm.MethodName == "metaObject" || mm.MethodName == "qt_metacast" { diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index 9cced1ec..79543a20 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -532,9 +532,8 @@ func (c *CppClass) DirectInheritClassInfo() []lookupResultClass { for _, inh := range c.DirectInherits { cinfo, ok := KnownClassnames[inh] if !ok { - if strings.HasPrefix(inh, `QList<`) { + if !AllowInheritedParent(inh) { // OK, allow this one to slip through - // e.g. QItemSelection extends a QList<> continue } else { panic("Class " + c.ClassName + " inherits from unknown class " + inh)