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" {
|
} else if tok == "qreal" {
|
||||||
// Transform typedef
|
// Transform typedef
|
||||||
insert.ParameterType += " double"
|
insert.ParameterType += " double"
|
||||||
|
} else if tok == "WId" {
|
||||||
|
// Transform typedef
|
||||||
|
insert.ParameterType += " uintptr_t"
|
||||||
} else {
|
} else {
|
||||||
// Valid part of the type name
|
// Valid part of the type name
|
||||||
insert.ParameterType += " " + tok
|
insert.ParameterType += " " + tok
|
||||||
|
@ -140,6 +140,7 @@ func emitBindingHeader(src *CppParsedHeader, filename string) (string, error) {
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
|
||||||
|
@ -14,6 +14,9 @@ func (p CppParameter) RenderTypeGo() string {
|
|||||||
if p.ParameterType == "QString" {
|
if p.ParameterType == "QString" {
|
||||||
return "string"
|
return "string"
|
||||||
}
|
}
|
||||||
|
if p.ParameterType == "uintptr_t" {
|
||||||
|
return "uintptr"
|
||||||
|
}
|
||||||
|
|
||||||
if t, ok := p.QListOf(); ok {
|
if t, ok := p.QListOf(); ok {
|
||||||
return "[]" + t.RenderTypeGo()
|
return "[]" + t.RenderTypeGo()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user