genbindings: allow generating classes other than ^Q+

This commit is contained in:
mappu 2024-08-28 17:59:34 +12:00
parent 95e8ab2e02
commit 2a27c4e62f
2 changed files with 5 additions and 16 deletions

View File

@ -59,9 +59,6 @@ func ImportHeaderForClass(className string) bool {
} }
func AllowClass(className string) bool { func AllowClass(className string) bool {
if className[0] != 'Q' {
return false
}
if strings.HasSuffix(className, "Private") { if strings.HasSuffix(className, "Private") {
return false return false

View File

@ -65,21 +65,13 @@ func (p *CppParameter) UnderlyingType() string {
} }
func (p CppParameter) QtClassType() bool { func (p CppParameter) QtClassType() bool {
if p.ParameterType[0] != 'Q' {
return false
}
if strings.Contains(p.ParameterType, `::`) {
// Maybe if it's an inner class // Maybe if it's an inner class
if _, ok := KnownClassnames[p.ParameterType]; ok { if _, ok := KnownClassnames[p.ParameterType]; ok {
return true return true
} }
// Int type
return false
}
// Passed all conditions return false
return true
} }
func (p CppParameter) IsEnum() bool { func (p CppParameter) IsEnum() bool {