mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings/typedefs: exclude typedefs from class pointer declarations
This commit is contained in:
parent
4ee89b157f
commit
5fa7bd37eb
@ -96,8 +96,8 @@ func parseHeader(topLevel []interface{}) (*CppParsedHeader, error) {
|
||||
if typ, ok := node["type"].(map[string]interface{}); ok {
|
||||
if qualType, ok := typ["qualType"].(string); ok {
|
||||
ret.Typedefs = append(ret.Typedefs, CppTypedef{
|
||||
Name: nodename,
|
||||
Typedef: qualType,
|
||||
Alias: nodename,
|
||||
UnderlyingType: qualType,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -239,6 +239,12 @@ func getReferencedTypes(src *CppParsedHeader) []string {
|
||||
}
|
||||
}
|
||||
|
||||
// Some types (e.g. QRgb) are found but are typedefs, not classes
|
||||
for _, td := range src.Typedefs {
|
||||
delete(foundTypes, td.Alias)
|
||||
}
|
||||
|
||||
// Convert to sorted list
|
||||
foundTypesList := make([]string, 0, len(foundTypes))
|
||||
for ft := range foundTypes {
|
||||
if strings.HasPrefix(ft, "QList<") {
|
||||
|
@ -109,8 +109,8 @@ type CppClass struct {
|
||||
}
|
||||
|
||||
type CppTypedef struct {
|
||||
Name string
|
||||
Typedef string
|
||||
Alias string
|
||||
UnderlyingType string
|
||||
}
|
||||
|
||||
type CppParsedHeader struct {
|
||||
|
Loading…
Reference in New Issue
Block a user