From 58eee48a5de628a9414f8127574bcbdcf11975e1 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 17 Aug 2024 14:09:51 +1200 Subject: [PATCH] genbindings: blacklist QFooPrivate --- cmd/genbindings/clang2il.go | 5 +++++ cmd/genbindings/emitcabi.go | 3 +++ 2 files changed, 8 insertions(+) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 3a3f95b0..f92e6ed0 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -51,6 +51,11 @@ func parseHeader(topLevel []interface{}) (*CppParsedHeader, error) { } } + // Also skip over any QFooPrivate classes + if nodename[0] == 'Q' && strings.HasSuffix(nodename, "Private") { + continue + } + // Process the inner class definition obj, err := processClassType(node, nodename) if err != nil { diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 688780a4..f2d181e7 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -268,6 +268,9 @@ func getReferencedTypes(src *CppParsedHeader) []string { if strings.HasPrefix(ft, "QList<") || strings.HasPrefix(ft, "QVector<") { continue } + if strings.HasSuffix(ft, "Private") { // qbrush.h finds QGradientPrivate + continue + } if ft == "QRgb" { continue }