mirror of
https://github.com/mappu/miqt.git
synced 2025-01-03 06:08:38 +00:00
genbindings/config: make AllowType a superset of AllowClass
This commit is contained in:
parent
ee25750b35
commit
2fa853d836
@ -198,6 +198,9 @@ func AllowMethod(className string, mm CppMethod) error {
|
|||||||
return nil // OK, allow
|
return nil // OK, allow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AllowType controls whether to permit binding of a method, if a method uses
|
||||||
|
// this type in its parameter list or return type.
|
||||||
|
// Any type not permitted by AllowClass is also not permitted by this method.
|
||||||
func AllowType(p CppParameter, isReturnType bool) error {
|
func AllowType(p CppParameter, isReturnType bool) error {
|
||||||
|
|
||||||
if p.QMapOf() {
|
if p.QMapOf() {
|
||||||
@ -222,6 +225,9 @@ func AllowType(p CppParameter, isReturnType bool) error {
|
|||||||
return ErrTooComplex
|
return ErrTooComplex
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !AllowClass(p.ParameterType) {
|
||||||
|
return ErrTooComplex // This whole class type has been blocked, not only as a parameter/return type
|
||||||
|
}
|
||||||
|
|
||||||
if strings.Contains(p.ParameterType, "(*)") { // Function pointer.
|
if strings.Contains(p.ParameterType, "(*)") { // Function pointer.
|
||||||
return ErrTooComplex // e.g. QAccessible_InstallFactory
|
return ErrTooComplex // e.g. QAccessible_InstallFactory
|
||||||
@ -356,9 +362,6 @@ func AllowType(p CppParameter, isReturnType bool) error {
|
|||||||
"QtMsgType", // e.g. qdebug.h TODO Defined in qlogging.h, but omitted because it's predefined in qglobal.h, and our clangexec is too agressive
|
"QtMsgType", // e.g. qdebug.h TODO Defined in qlogging.h, but omitted because it's predefined in qglobal.h, and our clangexec is too agressive
|
||||||
"QTextStreamFunction", // e.g. qdebug.h
|
"QTextStreamFunction", // e.g. qdebug.h
|
||||||
"QFactoryInterface", // qfactoryinterface.h
|
"QFactoryInterface", // qfactoryinterface.h
|
||||||
"QItemSelection", // used by qabstractproxymodel.h, also blocked in AllowClass above, class extends a List<T>
|
|
||||||
"QTextStreamManipulator", // used by qdebug.h, also blocked in AllowClass above
|
|
||||||
"QException", // used by qfutureinterface.h, also blocked in AllowClass above
|
|
||||||
"QTextEngine", // used by qtextlayout.h, also blocked in ImportHeaderForClass above
|
"QTextEngine", // used by qtextlayout.h, also blocked in ImportHeaderForClass above
|
||||||
"QVulkanInstance", // e.g. qwindow.h. Not tackling vulkan yet
|
"QVulkanInstance", // e.g. qwindow.h. Not tackling vulkan yet
|
||||||
"QPlatformNativeInterface", // e.g. QGuiApplication::platformNativeInterface(). Private type, could probably expose as uintptr. n.b. Changes in Qt6
|
"QPlatformNativeInterface", // e.g. QGuiApplication::platformNativeInterface(). Private type, could probably expose as uintptr. n.b. Changes in Qt6
|
||||||
|
Loading…
Reference in New Issue
Block a user