mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings: always take Qt arguments by pointer
This commit is contained in:
parent
d952b1ef75
commit
526fa612fc
@ -48,6 +48,13 @@ func emitParametersCabi(m CppMethod, selfType string) string {
|
|||||||
// Pointer to Qt type
|
// Pointer to Qt type
|
||||||
// Replace with taking our PQ typedef by value
|
// Replace with taking our PQ typedef by value
|
||||||
tmp = append(tmp, "P"+p.ParameterType+" "+p.ParameterName)
|
tmp = append(tmp, "P"+p.ParameterType+" "+p.ParameterName)
|
||||||
|
|
||||||
|
} else if p.QtClassType() {
|
||||||
|
// Qt type passed by value
|
||||||
|
// The CABI will unconditionally take these by pointer and dereference them
|
||||||
|
// when passing to C++
|
||||||
|
tmp = append(tmp, "P"+p.ParameterType+" "+p.ParameterName)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// RenderTypeCpp renders both pointer+reference as pointers
|
// RenderTypeCpp renders both pointer+reference as pointers
|
||||||
tmp = append(tmp, p.RenderTypeCpp()+" "+p.ParameterName)
|
tmp = append(tmp, p.RenderTypeCpp()+" "+p.ParameterName)
|
||||||
|
Loading…
Reference in New Issue
Block a user