mirror of
https://github.com/mappu/miqt.git
synced 2025-01-05 07:08:39 +00:00
genbindings: fix missing QList import if there are only QList<int> uses
This commit is contained in:
parent
0dce1b4fe2
commit
d485d8850e
@ -231,31 +231,37 @@ 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?
|
||||||
|
if t.QtClassType() {
|
||||||
foundTypes[t.ParameterType] = struct{}{}
|
foundTypes[t.ParameterType] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for _, m := range c.Methods {
|
for _, m := range c.Methods {
|
||||||
for _, p := range m.Parameters {
|
for _, p := range m.Parameters {
|
||||||
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?
|
||||||
|
if t.QtClassType() {
|
||||||
foundTypes[t.ParameterType] = struct{}{}
|
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?
|
||||||
|
if t.QtClassType() {
|
||||||
foundTypes[t.ParameterType] = struct{}{}
|
foundTypes[t.ParameterType] = struct{}{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Some types (e.g. QRgb) are found but are typedefs, not classes
|
// Some types (e.g. QRgb) are found but are typedefs, not classes
|
||||||
for _, td := range src.Typedefs {
|
for _, td := range src.Typedefs {
|
||||||
|
Loading…
Reference in New Issue
Block a user