mirror of
https://github.com/mappu/miqt.git
synced 2025-01-22 06:30:38 +00:00
genbindings: bind QVector<T> as []T, like QList
This commit is contained in:
parent
a579f80d34
commit
b87c5998b1
@ -252,7 +252,7 @@ func getReferencedTypes(src *CppParsedHeader) []string {
|
|||||||
// Convert to sorted list
|
// Convert to sorted list
|
||||||
foundTypesList := make([]string, 0, len(foundTypes))
|
foundTypesList := make([]string, 0, len(foundTypes))
|
||||||
for ft := range foundTypes {
|
for ft := range foundTypes {
|
||||||
if strings.HasPrefix(ft, "QList<") {
|
if strings.HasPrefix(ft, "QList<") || strings.HasPrefix(ft, "QVector<") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if ft == "QRgb" {
|
if ft == "QRgb" {
|
||||||
|
@ -22,6 +22,10 @@ func (p CppParameter) QListOf() (CppParameter, bool) {
|
|||||||
return parseSingleTypeString(p.ParameterType[6 : len(p.ParameterType)-1]), true
|
return parseSingleTypeString(p.ParameterType[6 : len(p.ParameterType)-1]), true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.HasPrefix(p.ParameterType, "QVector<") && strings.HasSuffix(p.ParameterType, `>`) {
|
||||||
|
return parseSingleTypeString(p.ParameterType[8 : len(p.ParameterType)-1]), true
|
||||||
|
}
|
||||||
|
|
||||||
return CppParameter{}, false
|
return CppParameter{}, false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user