mirror of
https://github.com/mappu/miqt.git
synced 2025-01-20 21:50:38 +00:00
genbindings: move inheritance exceptions to config-allowlist
This commit is contained in:
parent
8705ac0b5c
commit
d3319cf273
@ -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 {
|
func AllowVirtual(mm CppMethod) bool {
|
||||||
|
|
||||||
if mm.MethodName == "metaObject" || mm.MethodName == "qt_metacast" {
|
if mm.MethodName == "metaObject" || mm.MethodName == "qt_metacast" {
|
||||||
|
@ -532,9 +532,8 @@ func (c *CppClass) DirectInheritClassInfo() []lookupResultClass {
|
|||||||
for _, inh := range c.DirectInherits {
|
for _, inh := range c.DirectInherits {
|
||||||
cinfo, ok := KnownClassnames[inh]
|
cinfo, ok := KnownClassnames[inh]
|
||||||
if !ok {
|
if !ok {
|
||||||
if strings.HasPrefix(inh, `QList<`) {
|
if !AllowInheritedParent(inh) {
|
||||||
// OK, allow this one to slip through
|
// OK, allow this one to slip through
|
||||||
// e.g. QItemSelection extends a QList<>
|
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
panic("Class " + c.ClassName + " inherits from unknown class " + inh)
|
panic("Class " + c.ClassName + " inherits from unknown class " + inh)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user