diff --git a/cmd/genbindings/exceptions.go b/cmd/genbindings/exceptions.go index 6b5ce35b..690b7e3f 100644 --- a/cmd/genbindings/exceptions.go +++ b/cmd/genbindings/exceptions.go @@ -108,6 +108,9 @@ func CheckComplexity(p CppParameter, isReturnType bool) error { if strings.HasPrefix(p.ParameterType, "QGenericMatrix<") { return ErrTooComplex // e.g. qmatrix4x4.h } + if strings.HasPrefix(p.ParameterType, "QUrlTwoFlags<") { + return ErrTooComplex // e.g. qurl.h + } if strings.HasPrefix(p.ParameterType, "std::") { // std::initializer e.g. qcborarray.h // std::string QByteArray->toStdString(). There are QString overloads already @@ -147,8 +150,16 @@ func CheckComplexity(p CppParameter, isReturnType bool) error { return ErrTooComplex // e.g. qformlayout. The cast doesn't survive through a pointer parameter } - if p.ParameterType != "char" && p.Pointer && p.PointerCount >= 2 { // Out-parameters - return ErrTooComplex // e.g. QGraphicsItem_IsBlockedByModalPanel1 + if p.Pointer && p.PointerCount >= 2 { // Out-parameters + if p.ParameterType != "char" { + return ErrTooComplex // e.g. QGraphicsItem_IsBlockedByModalPanel1 + } + if p.ParameterType == "char" && p.ParameterName == "xpm" { + // Array parameters: + // - QPixmap and QImage ctors from an xpm char*[] + // TODO support these + return ErrTooComplex + } } switch p.ParameterType { @@ -177,6 +188,7 @@ func CheckComplexity(p CppParameter, isReturnType bool) error { "QGraphicsEffectSource", // e.g. used by qgraphicseffect.h, but the definition is in ???? "QAbstractUndoItem", // e.g. Defined in qtextdocument.h "QTextObjectInterface", // e.g. qabstracttextdocumentlayout.h + "QUrl::FormattingOptions", // e.g. QUrl.h. Typedef for a complex template type "QXmlStreamEntityDeclarations", // e.g. qxmlstream.h. The class definition was blacklisted for ???? reason so don't allow it as a parameter either "QXmlStreamNamespaceDeclarations", // e.g. qxmlstream.h. As above "QXmlStreamNotationDeclarations", // e.g. qxmlstream.h. As above diff --git a/cmd/genbindings/intermediate.go b/cmd/genbindings/intermediate.go index 298fd57b..ab93668b 100644 --- a/cmd/genbindings/intermediate.go +++ b/cmd/genbindings/intermediate.go @@ -78,6 +78,7 @@ func (p CppParameter) IsFlagType() bool { switch p.ParameterType { case "QTouchEvent::TouchPoint::InfoFlags", "QFile::Permissions", + "QWizard::WizardButton", "QFormLayout::ItemRole", "QFormLayout::RowWrapPolicy": return true