mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
genbindings/qmap: fix not applying typedefs to inner types
This commit is contained in:
parent
598b8bdb89
commit
e1cbcb4629
@ -29,6 +29,21 @@ func applyTypedefs(p CppParameter) CppParameter {
|
||||
p.QtCppOriginalType = &tmp
|
||||
}
|
||||
p.ParameterType = p.ParameterType[0:bpos] + `<` + t2.RenderTypeQtCpp() + `>`
|
||||
|
||||
} else if kType, vType, ok := p.QMapOf(); ok {
|
||||
kType2 := applyTypedefs(kType)
|
||||
kType2.QtCppOriginalType = nil
|
||||
|
||||
vType2 := applyTypedefs(vType)
|
||||
vType2.QtCppOriginalType = nil
|
||||
|
||||
bpos := strings.Index(p.ParameterType, `<`)
|
||||
|
||||
if p.QtCppOriginalType == nil {
|
||||
tmp := p // copy
|
||||
p.QtCppOriginalType = &tmp
|
||||
}
|
||||
p.ParameterType = p.ParameterType[0:bpos] + `<` + kType2.RenderTypeQtCpp() + `, ` + vType2.RenderTypeQtCpp() + `>`
|
||||
}
|
||||
|
||||
return p
|
||||
|
Loading…
Reference in New Issue
Block a user