mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings: more exceptions
This commit is contained in:
parent
d8c7e9e770
commit
1e539748e6
@ -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,9 +150,17 @@ 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
|
||||
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 {
|
||||
case
|
||||
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user