mirror of
https://github.com/mappu/miqt.git
synced 2025-04-28 08:00:22 +00:00
genbindings: fix wrong cabiZeroValue() for QString-pointers
This commit is contained in:
parent
afdc8409ab
commit
9dbb0d4152
@ -622,8 +622,9 @@ func getCppZeroValue(p CppParameter) string {
|
|||||||
func getCabiZeroValue(p CppParameter) string {
|
func getCabiZeroValue(p CppParameter) string {
|
||||||
// n.b. Identical to getCppZeroValue in most cases
|
// n.b. Identical to getCppZeroValue in most cases
|
||||||
|
|
||||||
if p.Pointer {
|
if p.Pointer && !(p.ParameterType == "QString") {
|
||||||
return getCppZeroValue(p)
|
return getCppZeroValue(p)
|
||||||
|
|
||||||
} else if ev, ok := KnownEnums[p.ParameterType]; ok {
|
} else if ev, ok := KnownEnums[p.ParameterType]; ok {
|
||||||
// In CABI the zero value may be the underlying type of an enum instead
|
// In CABI the zero value may be the underlying type of an enum instead
|
||||||
return "(" + ev.Enum.UnderlyingType.RenderTypeCabi() + ")(0)"
|
return "(" + ev.Enum.UnderlyingType.RenderTypeCabi() + ")(0)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user