mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
genbindings: move QFlag<> handling into normal emitgo/emitcabi emission
This commit is contained in:
parent
150dab7c46
commit
64e46e1978
@ -626,10 +626,6 @@ func tokenizeMultipleParameters(p string) []string {
|
||||
|
||||
func parseSingleTypeString(p string) CppParameter {
|
||||
|
||||
if strings.HasPrefix(p, "QFlag<") {
|
||||
return CppParameter{ParameterType: "int"}
|
||||
}
|
||||
|
||||
if strings.Contains(p, "(*)") {
|
||||
return CppParameter{ParameterType: "uintptr"} // Function pointer, nonrepresentible
|
||||
}
|
||||
|
@ -45,7 +45,10 @@ func (p CppParameter) RenderTypeCabi() string {
|
||||
ret = "ptrdiff_t"
|
||||
}
|
||||
|
||||
if strings.Contains(p.ParameterType, `::`) {
|
||||
if strings.HasPrefix(p.ParameterType, `QFlags<`) {
|
||||
ret = "int"
|
||||
|
||||
} else if strings.Contains(p.ParameterType, `::`) {
|
||||
if _, ok := KnownClassnames[p.ParameterType]; ok {
|
||||
// Inner class
|
||||
ret = cabiClassName(p.ParameterType)
|
||||
|
@ -81,7 +81,10 @@ func (p CppParameter) RenderTypeGo() string {
|
||||
ret += "uintptr"
|
||||
default:
|
||||
|
||||
if strings.Contains(p.ParameterType, `::`) {
|
||||
if strings.HasPrefix(p.ParameterType, `QFlags<`) {
|
||||
ret += "int"
|
||||
|
||||
} else if strings.Contains(p.ParameterType, `::`) {
|
||||
if _, ok := KnownClassnames[p.ParameterType]; ok {
|
||||
// Inner class
|
||||
ret += cabiClassName(p.ParameterType)
|
||||
|
Loading…
Reference in New Issue
Block a user