From 55481316ed64733ca1667de8f3665dc17a55e121 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 10 Aug 2024 12:54:14 +1200 Subject: [PATCH] genbindings: hide ctors that take QFooPrivate-type parameters --- cmd/genbindings/clang2il.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 28bba98c..1f1eab1d 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -137,6 +137,13 @@ nextMethod: return CppClass{}, err } + // Some QFoo constructors take a QFooPrivate + for _, p := range mm.Parameters { + if strings.Contains(p.ParameterType, "Private") { + log.Printf("Skipping constructor taking Private type") + continue nextMethod + } + } ret.Ctors = append(ret.Ctors, mm)