diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index c4b4d559..4dd2d707 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -166,6 +166,12 @@ func processClassType(node map[string]interface{}, addNamePrefix string) (CppCla return CppClass{}, ErrNoContent // errors.New("node has no name") } nodename = addNamePrefix + nodename + + // Hacks: + if nodename == "FromBase64Result" { + nodename = "QByteArray::FromBase64Result" + } + ret.ClassName = nodename log.Printf("-> Processing class %q...\n", nodename) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 2453faf7..bdd040d3 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -594,6 +594,7 @@ extern "C" { nonConst.Const = false nonConst.ByRef = false nonConst.Pointer = true + nonConst.PointerCount = 1 afterCall += "\treturn const_cast<" + nonConst.RenderTypeQtCpp() + ">(&ret);\n" } else { afterCall += "\treturn &ret;\n" diff --git a/cmd/genbindings/transformtypedefs_test.go b/cmd/genbindings/transformtypedefs_test.go index 87ed5518..dcce7270 100644 --- a/cmd/genbindings/transformtypedefs_test.go +++ b/cmd/genbindings/transformtypedefs_test.go @@ -17,10 +17,7 @@ func TestTransformTypedefs(t *testing.T) { CppMethod{ Parameters: []CppParameter{ - CppParameter{ - ParameterName: "foo", - ParameterType: typeName, - }, + parseSingleTypeString(typeName), }, IsStatic: true, },