From 36994e6547e66403f69a8d96f9e9fef5ac92bdb1 Mon Sep 17 00:00:00 2001 From: mappu Date: Thu, 22 Aug 2024 19:20:34 +1200 Subject: [PATCH] genbindings: more exceptions --- cmd/genbindings/clang2il.go | 10 ++++++++++ cmd/genbindings/exceptions.go | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 372c18eb..ca9c7e36 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -349,6 +349,16 @@ nextMethod: continue nextMethod } + if ret.ClassName == "QLockFile" && mm.MethodName == "getLockInfo" && len(mm.Parameters) == 3 && mm.Parameters[1].ParameterType == "QString" && mm.Parameters[1].Pointer { + log.Printf("Skipping method %q using complex return type by pointer argument", mm.MethodName) // TODO support this + continue nextMethod + } + + if ret.ClassName == "QTextDecoder" && mm.MethodName == "toUnicode" && len(mm.Parameters) == 3 && mm.Parameters[0].ParameterType == "QString" && mm.Parameters[0].Pointer { + log.Printf("Skipping method %q using complex return type by pointer argument", mm.MethodName) // TODO support this + continue nextMethod + } + ret.Methods = append(ret.Methods, mm) default: diff --git a/cmd/genbindings/exceptions.go b/cmd/genbindings/exceptions.go index a15dfddc..01f8b122 100644 --- a/cmd/genbindings/exceptions.go +++ b/cmd/genbindings/exceptions.go @@ -53,7 +53,9 @@ func ImportHeaderForClass(className string) bool { switch className { case "QGraphicsEffectSource", // e.g. qgraphicseffect.h - "QText": // e.g. qtextcursor.h + "QAbstractConcatenable", // qstringbuilder.h + "QTextEngine", // qtextlayout.h + "QText": // e.g. qtextcursor.h return false }