genbindings: skip non-Qt classes found

This commit is contained in:
mappu 2024-08-14 18:38:57 +12:00
parent 94182079e1
commit a6d63f33d2
2 changed files with 17 additions and 0 deletions

View File

@ -87,6 +87,7 @@ func main() {
} }
// AST transforms on our IL // AST transforms on our IL
astTransformBlacklist(parsed)
astTransformOptional(parsed) astTransformOptional(parsed)
astTransformOverloads(parsed) astTransformOverloads(parsed)

View File

@ -0,0 +1,16 @@
package main
// astTransformBlacklist filters out things we do not want to parse.
func astTransformBlacklist(parsed *CppParsedHeader) {
var keep []CppClass
for _, c := range parsed.Classes {
if c.ClassName[0] != 'Q' {
continue
}
keep = append(keep, c)
}
parsed.Classes = keep
}