genbindings: remove special-case qreal handling

This commit is contained in:
mappu 2024-08-18 18:56:09 +12:00
parent d5eeb64c86
commit 6d09ef795b
3 changed files with 3 additions and 4 deletions

View File

@ -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"

View File

@ -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":

View File

@ -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 {