genbindings: fix missing QList import if there are only QList<int> uses

This commit is contained in:
mappu 2024-08-17 14:10:33 +12:00
parent 0dce1b4fe2
commit d485d8850e

View File

@ -231,9 +231,11 @@ func getReferencedTypes(src *CppParsedHeader) []string {
if p.QtClassType() { if p.QtClassType() {
foundTypes[p.ParameterType] = struct{}{} foundTypes[p.ParameterType] = struct{}{}
} }
if t, ok := p.QListOf(); ok && t.QtClassType() { if t, ok := p.QListOf(); ok {
foundTypes["QList"] = struct{}{} foundTypes["QList"] = struct{}{} // FIXME or QVector?
foundTypes[t.ParameterType] = struct{}{} if t.QtClassType() {
foundTypes[t.ParameterType] = struct{}{}
}
} }
} }
} }
@ -242,17 +244,21 @@ func getReferencedTypes(src *CppParsedHeader) []string {
if p.QtClassType() { if p.QtClassType() {
foundTypes[p.ParameterType] = struct{}{} foundTypes[p.ParameterType] = struct{}{}
} }
if t, ok := p.QListOf(); ok && t.QtClassType() { if t, ok := p.QListOf(); ok {
foundTypes["QList"] = struct{}{} foundTypes["QList"] = struct{}{} // FIXME or QVector?
foundTypes[t.ParameterType] = struct{}{} if t.QtClassType() {
foundTypes[t.ParameterType] = struct{}{}
}
} }
} }
if m.ReturnType.QtClassType() { if m.ReturnType.QtClassType() {
foundTypes[m.ReturnType.ParameterType] = struct{}{} foundTypes[m.ReturnType.ParameterType] = struct{}{}
} }
if t, ok := m.ReturnType.QListOf(); ok && t.QtClassType() { if t, ok := m.ReturnType.QListOf(); ok {
foundTypes["QList"] = struct{}{} foundTypes["QList"] = struct{}{} // FIXME or QVector?
foundTypes[t.ParameterType] = struct{}{} if t.QtClassType() {
foundTypes[t.ParameterType] = struct{}{}
}
} }
} }
} }