mirror of
https://github.com/mappu/miqt.git
synced 2025-01-03 14:18:37 +00:00
genbindings: misc fixes
This commit is contained in:
parent
56395eaa7a
commit
8da51d61f5
@ -166,6 +166,12 @@ func processClassType(node map[string]interface{}, addNamePrefix string) (CppCla
|
|||||||
return CppClass{}, ErrNoContent // errors.New("node has no name")
|
return CppClass{}, ErrNoContent // errors.New("node has no name")
|
||||||
}
|
}
|
||||||
nodename = addNamePrefix + nodename
|
nodename = addNamePrefix + nodename
|
||||||
|
|
||||||
|
// Hacks:
|
||||||
|
if nodename == "FromBase64Result" {
|
||||||
|
nodename = "QByteArray::FromBase64Result"
|
||||||
|
}
|
||||||
|
|
||||||
ret.ClassName = nodename
|
ret.ClassName = nodename
|
||||||
|
|
||||||
log.Printf("-> Processing class %q...\n", nodename)
|
log.Printf("-> Processing class %q...\n", nodename)
|
||||||
|
@ -594,6 +594,7 @@ extern "C" {
|
|||||||
nonConst.Const = false
|
nonConst.Const = false
|
||||||
nonConst.ByRef = false
|
nonConst.ByRef = false
|
||||||
nonConst.Pointer = true
|
nonConst.Pointer = true
|
||||||
|
nonConst.PointerCount = 1
|
||||||
afterCall += "\treturn const_cast<" + nonConst.RenderTypeQtCpp() + ">(&ret);\n"
|
afterCall += "\treturn const_cast<" + nonConst.RenderTypeQtCpp() + ">(&ret);\n"
|
||||||
} else {
|
} else {
|
||||||
afterCall += "\treturn &ret;\n"
|
afterCall += "\treturn &ret;\n"
|
||||||
|
@ -17,10 +17,7 @@ func TestTransformTypedefs(t *testing.T) {
|
|||||||
|
|
||||||
CppMethod{
|
CppMethod{
|
||||||
Parameters: []CppParameter{
|
Parameters: []CppParameter{
|
||||||
CppParameter{
|
parseSingleTypeString(typeName),
|
||||||
ParameterName: "foo",
|
|
||||||
ParameterType: typeName,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
IsStatic: true,
|
IsStatic: true,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user