mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 00:48:38 +00:00
genbindings/transform: fix missing enums/typedefs from inner classes
This commit is contained in:
parent
b11e21092a
commit
d8239b6a91
@ -21,9 +21,6 @@ func InsertTypedefs() {
|
||||
// Not sure the reason for this one
|
||||
KnownTypedefs["QSocketDescriptor::DescriptorType"] = CppTypedef{"QSocketDescriptor::DescriptorType", parseSingleTypeString("QSocketNotifier::Type")}
|
||||
|
||||
// QFlags<> typedef
|
||||
KnownTypedefs["QTouchEvent::TouchPoint::InfoFlags"] = CppTypedef{"QTouchEvent::TouchPoint::InfoFlags", parseSingleTypeString("QFlags<QTouchEvent::TouchPoint::InfoFlag>")}
|
||||
|
||||
// QFile doesn't see QFileDevice parent class enum
|
||||
KnownTypedefs["QFile::Permissions"] = CppTypedef{"QFile::Permissions", parseSingleTypeString("QFileDevice::Permissions")}
|
||||
KnownTypedefs["QFileDevice::Permissions"] = CppTypedef{"QFile::Permissions", parseSingleTypeString("QFlags<QFileDevice::Permission>")}
|
||||
|
@ -24,11 +24,18 @@ func astTransformChildClasses(parsed *CppParsedHeader) {
|
||||
var taken []CppClass
|
||||
|
||||
for i, c := range parsed.Classes {
|
||||
taken = append(taken, takeChildren(&parsed.Classes[i])...)
|
||||
|
||||
nestedClasses := takeChildren(&parsed.Classes[i])
|
||||
|
||||
taken = append(taken, nestedClasses...)
|
||||
|
||||
// Also lift all child typedefs and enums
|
||||
parsed.Typedefs = append(parsed.Typedefs, c.ChildTypedefs...)
|
||||
parsed.Enums = append(parsed.Enums, c.ChildEnums...)
|
||||
for _, nc := range nestedClasses {
|
||||
parsed.Typedefs = append(parsed.Typedefs, nc.ChildTypedefs...)
|
||||
parsed.Enums = append(parsed.Enums, nc.ChildEnums...)
|
||||
}
|
||||
}
|
||||
|
||||
parsed.Classes = append(parsed.Classes, taken...)
|
||||
|
@ -65,6 +65,13 @@ const (
|
||||
QInputMethodEvent__AttributeType__Selection QInputMethodEvent__AttributeType = 4
|
||||
)
|
||||
|
||||
type QTouchEvent__TouchPoint__InfoFlag int
|
||||
|
||||
const (
|
||||
QTouchEvent__TouchPoint__InfoFlag__Pen QTouchEvent__TouchPoint__InfoFlag = 1
|
||||
QTouchEvent__TouchPoint__InfoFlag__Token QTouchEvent__TouchPoint__InfoFlag = 2
|
||||
)
|
||||
|
||||
type QScrollEvent__ScrollState int
|
||||
|
||||
const (
|
||||
|
Loading…
Reference in New Issue
Block a user