mirror of
https://github.com/mappu/miqt.git
synced 2025-02-08 22:10:23 +00:00
Merge pull request #169 from mappu/miqt-fix-qt682
Qt 6.8.2 compatibility fix for QStringConverterBase
This commit is contained in:
commit
b61e12fcc9
@ -394,6 +394,10 @@ nextMethod:
|
||||
// an existing class instance
|
||||
mm.IsStatic = true
|
||||
|
||||
if !AllowCtor(ret.ClassName, mm) {
|
||||
continue
|
||||
}
|
||||
|
||||
ret.Ctors = append(ret.Ctors, mm)
|
||||
|
||||
case "CXXDestructorDecl":
|
||||
|
@ -321,6 +321,20 @@ func AllowMethod(className string, mm CppMethod) error {
|
||||
return nil // OK, allow
|
||||
}
|
||||
|
||||
func AllowCtor(className string, mm CppMethod) bool {
|
||||
|
||||
if className == `QStringConverterBase` {
|
||||
// Both the main ctor and the copy constructor were changed from public to protected between 6.8.1 and 6.8.2
|
||||
// @ref https://github.com/qt/qtbase/commit/41679e0b4398c0de38a8107642dc643fe2c3554f
|
||||
// @ref https://github.com/mappu/miqt/issues/168
|
||||
// Block both ctors from generation
|
||||
return false
|
||||
}
|
||||
|
||||
// Default allow
|
||||
return true
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
@ -12,14 +12,6 @@ extern "C" {
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
QStringConverterBase* QStringConverterBase_new(QStringConverterBase* param1) {
|
||||
return new QStringConverterBase(*param1);
|
||||
}
|
||||
|
||||
QStringConverterBase* QStringConverterBase_new2() {
|
||||
return new QStringConverterBase();
|
||||
}
|
||||
|
||||
void QStringConverter_virtbase(QStringConverter* src, QStringConverterBase** outptr_QStringConverterBase) {
|
||||
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(src);
|
||||
}
|
||||
|
@ -71,18 +71,6 @@ func UnsafeNewQStringConverterBase(h unsafe.Pointer) *QStringConverterBase {
|
||||
return newQStringConverterBase((*C.QStringConverterBase)(h))
|
||||
}
|
||||
|
||||
// NewQStringConverterBase constructs a new QStringConverterBase object.
|
||||
func NewQStringConverterBase(param1 *QStringConverterBase) *QStringConverterBase {
|
||||
|
||||
return newQStringConverterBase(C.QStringConverterBase_new(param1.cPointer()))
|
||||
}
|
||||
|
||||
// NewQStringConverterBase2 constructs a new QStringConverterBase object.
|
||||
func NewQStringConverterBase2() *QStringConverterBase {
|
||||
|
||||
return newQStringConverterBase(C.QStringConverterBase_new2())
|
||||
}
|
||||
|
||||
type QStringConverter struct {
|
||||
h *C.QStringConverter
|
||||
*QStringConverterBase
|
||||
|
@ -28,8 +28,6 @@ typedef struct QStringConverterBase QStringConverterBase;
|
||||
typedef struct QStringConverterBase__State QStringConverterBase__State;
|
||||
#endif
|
||||
|
||||
QStringConverterBase* QStringConverterBase_new(QStringConverterBase* param1);
|
||||
QStringConverterBase* QStringConverterBase_new2();
|
||||
|
||||
void QStringConverter_virtbase(QStringConverter* src, QStringConverterBase** outptr_QStringConverterBase);
|
||||
bool QStringConverter_isValid(const QStringConverter* self);
|
||||
|
Loading…
x
Reference in New Issue
Block a user