diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 4a6ebeae..92546a35 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -465,9 +465,6 @@ func parseSingleTypeString(p string) CppParameter { insert.ByRef = true } else if tok == "*" { insert.Pointer = true - } else if tok == "qreal" { - // Transform typedef - insert.ParameterType += " double" } else if tok == "WId" { // Transform typedef insert.ParameterType += " uintptr_t" diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index a4608c63..dbf92127 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -35,6 +35,8 @@ func (p CppParameter) RenderTypeCpp() string { ret = "_Float16" // No idea where this typedef comes from, but it exists case "qsizetype": ret = "size_t" + case "qreal": + ret = "double" case "qintptr": ret = "uintptr_t" case "QRgb": diff --git a/cmd/genbindings/emitgo.go b/cmd/genbindings/emitgo.go index ff12c294..b6c4944b 100644 --- a/cmd/genbindings/emitgo.go +++ b/cmd/genbindings/emitgo.go @@ -78,7 +78,7 @@ func (p CppParameter) RenderTypeGo() string { ret += "uint64" case "float": ret += "float32" - case "double": + case "double", "qreal": ret += "float64" case "qsizetype": if C.sizeof_size_t == 4 {