mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
genbindings: fixes for self parameters, binding building
This commit is contained in:
parent
0e8b48d1b8
commit
b5282f31b6
@ -258,6 +258,10 @@ nextMethod:
|
||||
return CppClass{}, err
|
||||
}
|
||||
|
||||
// Always set IsStatic for constructors, since they can be called without
|
||||
// an existing class instance
|
||||
mm.IsStatic = true
|
||||
|
||||
// Some QFoo constructors take a QFooPrivate
|
||||
for _, p := range mm.Parameters {
|
||||
if strings.Contains(p.ParameterType, "Private") {
|
||||
|
@ -390,7 +390,7 @@ extern "C" {
|
||||
ret.WriteString(fmt.Sprintf("%s %s_%s(%s);\n", emitReturnTypeCabi(m.ReturnType), c.ClassName, m.SafeMethodName(), emitParametersCabi(m, c.ClassName+"*")))
|
||||
|
||||
if m.IsSignal && !m.HasHiddenParams {
|
||||
ret.WriteString(fmt.Sprintf("%s %s_connect_%s(void* slot);\n", emitReturnTypeCabi(m.ReturnType), c.ClassName, m.SafeMethodName()))
|
||||
ret.WriteString(fmt.Sprintf("%s %s_connect_%s(%s* self, void* slot);\n", emitReturnTypeCabi(m.ReturnType), c.ClassName, m.SafeMethodName(), c.ClassName))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,8 @@ package qt
|
||||
|
||||
import (
|
||||
"C"
|
||||
"runtime/cgo"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type miqtCallbackFunc func(argc C.int, args *C.void)
|
||||
|
Loading…
Reference in New Issue
Block a user