genbindings/cabi: emit class typedef even if there is no header

This commit is contained in:
mappu 2024-10-19 09:21:55 +13:00
parent 896f150f35
commit f87002914d

View File

@ -577,9 +577,6 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
ret := strings.Builder{}
for _, ref := range getReferencedTypes(src) {
if !ImportHeaderForClass(ref) {
continue
}
if ref == "QString" {
ret.WriteString("#include <QString>\n")
@ -593,6 +590,10 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
continue
}
if !ImportHeaderForClass(ref) {
continue
}
ret.WriteString(`#include <` + ref + ">\n")
}