mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings: more exceptions, merge existing exceptions
This commit is contained in:
parent
a4baeabbcb
commit
3b65e1fc6f
@ -347,24 +347,6 @@ nextMethod:
|
|||||||
// an existing class instance
|
// an existing class instance
|
||||||
mm.IsStatic = true
|
mm.IsStatic = true
|
||||||
|
|
||||||
// Some QFoo constructors take a QFooPrivate
|
|
||||||
for _, p := range mm.Parameters {
|
|
||||||
if strings.Contains(p.ParameterType, "Private") {
|
|
||||||
log.Printf("Skipping constructor taking Private type")
|
|
||||||
continue nextMethod
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ret.ClassName == "QDebug" && len(mm.Parameters) == 1 && mm.Parameters[0].ParameterType == "QString" && mm.Parameters[0].Pointer {
|
|
||||||
log.Printf("Skipping ctor taking QString pointer")
|
|
||||||
continue nextMethod
|
|
||||||
}
|
|
||||||
|
|
||||||
if ret.ClassName == "QXmlStreamWriter" && len(mm.Parameters) == 1 && mm.Parameters[0].ParameterType == "QString" && mm.Parameters[0].Pointer {
|
|
||||||
log.Printf("Skipping ctor taking QString pointer") // qxmlstream.h 4th constructor overload
|
|
||||||
continue nextMethod
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.Ctors = append(ret.Ctors, mm)
|
ret.Ctors = append(ret.Ctors, mm)
|
||||||
|
|
||||||
case "CXXDestructorDecl":
|
case "CXXDestructorDecl":
|
||||||
|
@ -126,7 +126,14 @@ func CheckComplexity(p CppParameter, isReturnType bool) error {
|
|||||||
return ErrTooComplex // e.g. QAbstractItemModel::QPrivateSignal
|
return ErrTooComplex // e.g. QAbstractItemModel::QPrivateSignal
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Some QFoo constructors take a QFooPrivate
|
||||||
|
if p.ParameterType[0] == 'Q' && strings.HasSuffix(p.ParameterType, "Private") && !isReturnType {
|
||||||
|
return ErrTooComplex
|
||||||
|
}
|
||||||
|
|
||||||
// If any parameters are QString*, skip the method
|
// If any parameters are QString*, skip the method
|
||||||
|
// QDebug constructor
|
||||||
|
// QXmlStreamWriter constructor
|
||||||
// QFile::moveToTrash
|
// QFile::moveToTrash
|
||||||
// QLockFile::getLockInfo
|
// QLockFile::getLockInfo
|
||||||
// QTextDecoder::toUnicode
|
// QTextDecoder::toUnicode
|
||||||
@ -159,6 +166,9 @@ func CheckComplexity(p CppParameter, isReturnType bool) error {
|
|||||||
"char16_t", // e.g. QChar() constructor overload, just unnecessary
|
"char16_t", // e.g. QChar() constructor overload, just unnecessary
|
||||||
"char32_t", // e.g. QDebug().operator<< overload, unnecessary
|
"char32_t", // e.g. QDebug().operator<< overload, unnecessary
|
||||||
"wchar_t", // e.g. qstringview.h overloads, unnecessary
|
"wchar_t", // e.g. qstringview.h overloads, unnecessary
|
||||||
|
"QStringView::const_pointer", // e.g. qstringview.h data()
|
||||||
|
"QStringView::const_iterator", // e.g. qstringview.h
|
||||||
|
"QStringView::value_type", // e.g. qstringview.h
|
||||||
"FILE", // e.g. qfile.h constructors
|
"FILE", // e.g. qfile.h constructors
|
||||||
"qInternalCallback", // e.g. qnamespace.h
|
"qInternalCallback", // e.g. qnamespace.h
|
||||||
"picture_io_handler", // e.g. QPictureIO::DefineIOHandler callback function
|
"picture_io_handler", // e.g. QPictureIO::DefineIOHandler callback function
|
||||||
|
Loading…
Reference in New Issue
Block a user