mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58: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")
|
||||
}
|
||||
nodename = addNamePrefix + nodename
|
||||
|
||||
// Hacks:
|
||||
if nodename == "FromBase64Result" {
|
||||
nodename = "QByteArray::FromBase64Result"
|
||||
}
|
||||
|
||||
ret.ClassName = nodename
|
||||
|
||||
log.Printf("-> Processing class %q...\n", nodename)
|
||||
|
@ -594,6 +594,7 @@ extern "C" {
|
||||
nonConst.Const = false
|
||||
nonConst.ByRef = false
|
||||
nonConst.Pointer = true
|
||||
nonConst.PointerCount = 1
|
||||
afterCall += "\treturn const_cast<" + nonConst.RenderTypeQtCpp() + ">(&ret);\n"
|
||||
} else {
|
||||
afterCall += "\treturn &ret;\n"
|
||||
|
@ -17,10 +17,7 @@ func TestTransformTypedefs(t *testing.T) {
|
||||
|
||||
CppMethod{
|
||||
Parameters: []CppParameter{
|
||||
CppParameter{
|
||||
ParameterName: "foo",
|
||||
ParameterType: typeName,
|
||||
},
|
||||
parseSingleTypeString(typeName),
|
||||
},
|
||||
IsStatic: true,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user