mirror of
https://github.com/mappu/miqt.git
synced 2025-01-21 06:00:38 +00:00
genbindings/intermediate: add Void() helper method
This commit is contained in:
parent
4fbf4c702a
commit
5a3c3556a1
@ -171,7 +171,7 @@ func AllowClass(className string) bool {
|
||||
}
|
||||
|
||||
func AllowSignal(mm CppMethod) bool {
|
||||
if mm.ReturnType.ParameterType != "void" {
|
||||
if !mm.ReturnType.Void() {
|
||||
// This affects how we cast the signal function pointer for connect
|
||||
// It would be fixable, but, real signals always have void return types anyway
|
||||
return false
|
||||
|
@ -343,7 +343,7 @@ func emitAssignCppToCabi(assignExpression string, p CppParameter, rvalue string)
|
||||
|
||||
namePrefix := makeNamePrefix(p.ParameterName)
|
||||
|
||||
if p.ParameterType == "void" && !p.Pointer {
|
||||
if p.Void() {
|
||||
shouldReturn = ""
|
||||
|
||||
} else if p.ParameterType == "QString" {
|
||||
|
@ -404,7 +404,7 @@ func (gfs *goFileState) emitCabiToGo(assignExpr string, rt CppParameter, rvalue
|
||||
afterword := ""
|
||||
namePrefix := makeNamePrefix(rt.ParameterName)
|
||||
|
||||
if rt.ParameterType == "void" && !rt.Pointer {
|
||||
if rt.Void() {
|
||||
shouldReturn = ""
|
||||
return shouldReturn + " " + rvalue + "\n" + afterword
|
||||
|
||||
|
@ -207,6 +207,10 @@ func (p CppParameter) IntType() bool {
|
||||
}
|
||||
}
|
||||
|
||||
func (p CppParameter) Void() bool {
|
||||
return p.ParameterType == "void" && !p.Pointer
|
||||
}
|
||||
|
||||
type CppProperty struct {
|
||||
PropertyName string
|
||||
PropertyType string
|
||||
|
Loading…
x
Reference in New Issue
Block a user