mirror of
https://github.com/mappu/miqt.git
synced 2025-01-20 21:50:38 +00:00
genbindings: change AllInherits() to return lookupResultClass
This commit is contained in:
parent
28fd54f6a3
commit
883ba8c131
@ -608,9 +608,9 @@ func getReferencedTypes(src *CppParsedHeader) []string {
|
||||
}
|
||||
maybeAddType(vm.ReturnType)
|
||||
}
|
||||
for _, cn := range c.AllInherits() {
|
||||
for _, cn := range c.AllInheritsClassInfo() {
|
||||
maybeAddType(CppParameter{
|
||||
ParameterType: cn,
|
||||
ParameterType: cn.Class.ClassName,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -505,17 +505,17 @@ func (c *CppClass) VirtualMethods() []CppMethod {
|
||||
return ret
|
||||
}
|
||||
|
||||
// AllInherits recursively finds and lists all the parent classes of this class.
|
||||
func (c *CppClass) AllInherits() []string {
|
||||
var ret []string
|
||||
// AllInheritsClassInfo recursively finds and lists all the parent classes of this class.
|
||||
func (c *CppClass) AllInheritsClassInfo() []lookupResultClass {
|
||||
var ret []lookupResultClass
|
||||
|
||||
// FIXME prevent duplicates arising from diamond inheritance
|
||||
|
||||
for _, baseClassInfo := range c.DirectInheritClassInfo() {
|
||||
|
||||
ret = append(ret, baseClassInfo.Class.ClassName)
|
||||
ret = append(ret, baseClassInfo)
|
||||
|
||||
recurseInfo := baseClassInfo.Class.AllInherits()
|
||||
recurseInfo := baseClassInfo.Class.AllInheritsClassInfo()
|
||||
for _, childClass := range recurseInfo {
|
||||
ret = append(ret, childClass)
|
||||
}
|
||||
@ -528,7 +528,7 @@ func (c *CppClass) AllInherits() []string {
|
||||
func (c *CppClass) DirectInheritClassInfo() []lookupResultClass {
|
||||
var ret []lookupResultClass
|
||||
|
||||
for _, inh := range c.DirectInherits { // AllInherits() {
|
||||
for _, inh := range c.DirectInherits {
|
||||
cinfo, ok := KnownClassnames[inh]
|
||||
if !ok {
|
||||
if strings.HasPrefix(inh, `QList<`) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user