mirror of
https://github.com/mappu/miqt.git
synced 2025-01-31 02:20:22 +00:00
genbindings: add WId->uintptr typedef for QWidget.h
This commit is contained in:
parent
08168454c1
commit
027c059b0b
@ -364,6 +364,9 @@ func parseSingleTypeString(p string) CppParameter {
|
||||
} else if tok == "qreal" {
|
||||
// Transform typedef
|
||||
insert.ParameterType += " double"
|
||||
} else if tok == "WId" {
|
||||
// Transform typedef
|
||||
insert.ParameterType += " uintptr_t"
|
||||
} else {
|
||||
// Valid part of the type name
|
||||
insert.ParameterType += " " + tok
|
||||
|
@ -140,6 +140,7 @@ func emitBindingHeader(src *CppParsedHeader, filename string) (string, error) {
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
|
@ -14,6 +14,9 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
if p.ParameterType == "QString" {
|
||||
return "string"
|
||||
}
|
||||
if p.ParameterType == "uintptr_t" {
|
||||
return "uintptr"
|
||||
}
|
||||
|
||||
if t, ok := p.QListOf(); ok {
|
||||
return "[]" + t.RenderTypeGo()
|
||||
|
Loading…
x
Reference in New Issue
Block a user