mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
genbindings: add missing header includes for some container types
This commit is contained in:
parent
10d01df372
commit
bfbaeaf514
@ -557,24 +557,28 @@ func getReferencedTypes(src *CppParsedHeader) []string {
|
|||||||
|
|
||||||
foundTypes := map[string]struct{}{}
|
foundTypes := map[string]struct{}{}
|
||||||
|
|
||||||
maybeAddType := func(p CppParameter) {
|
var maybeAddType func(p CppParameter)
|
||||||
|
maybeAddType = func(p CppParameter) {
|
||||||
if p.QtClassType() {
|
if p.QtClassType() {
|
||||||
foundTypes[p.ParameterType] = struct{}{}
|
foundTypes[p.ParameterType] = struct{}{}
|
||||||
}
|
}
|
||||||
if t, ok := p.QListOf(); ok {
|
if t, ok := p.QListOf(); ok {
|
||||||
foundTypes["QList"] = struct{}{} // FIXME or QVector?
|
foundTypes["QList"] = struct{}{} // FIXME or QVector?
|
||||||
if t.QtClassType() {
|
maybeAddType(t)
|
||||||
foundTypes[t.ParameterType] = struct{}{}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if kType, vType, ok := p.QMapOf(); ok {
|
if kType, vType, ok := p.QMapOf(); ok {
|
||||||
foundTypes["QMap"] = struct{}{} // FIXME or QHash?
|
foundTypes["QMap"] = struct{}{} // FIXME or QHash?
|
||||||
if kType.QtClassType() {
|
maybeAddType(kType)
|
||||||
foundTypes[kType.ParameterType] = struct{}{}
|
maybeAddType(vType)
|
||||||
}
|
}
|
||||||
if vType.QtClassType() {
|
if kType, vType, ok := p.QPairOf(); ok {
|
||||||
foundTypes[vType.ParameterType] = struct{}{}
|
foundTypes["QPair"] = struct{}{}
|
||||||
}
|
maybeAddType(kType)
|
||||||
|
maybeAddType(vType)
|
||||||
|
}
|
||||||
|
if t, ok := p.QSetOf(); ok {
|
||||||
|
foundTypes["QSet"] = struct{}{}
|
||||||
|
maybeAddType(t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -640,7 +644,7 @@ func cabiClassName(className string) string {
|
|||||||
|
|
||||||
func cabiPreventStructDeclaration(className string) bool {
|
func cabiPreventStructDeclaration(className string) bool {
|
||||||
switch className {
|
switch className {
|
||||||
case "QList", "QString", "QSet", "QMap", "QHash":
|
case "QList", "QString", "QSet", "QMap", "QHash", "QPair", "QVector", "QByteArray":
|
||||||
return true // These types are reprojected
|
return true // These types are reprojected
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user