genbindings/go: add extra type cast for QIntegerForSizeof<void *>::Signed

This commit is contained in:
mappu 2024-09-18 13:43:25 +12:00
parent f6d1ef8ade
commit 3f1c8cb1b8
3 changed files with 5 additions and 4 deletions

View File

@ -172,6 +172,7 @@ func (p CppParameter) IntType() bool {
"qintptr", "quintptr", "uintptr_t", "intptr_t",
"qsizetype", "size_t",
"QIntegerForSizeof<void *>::Unsigned",
"QIntegerForSizeof<void *>::Signed",
"qptrdiff", "ptrdiff_t",
"double", "float", "qreal":
return true

View File

@ -10,11 +10,11 @@
#include "_cgo_export.h"
QSocketNotifier* QSocketNotifier_new(intptr_t socket, int param2) {
return new QSocketNotifier(socket, static_cast<QSocketNotifier::Type>(param2));
return new QSocketNotifier(static_cast<qintptr>(socket), static_cast<QSocketNotifier::Type>(param2));
}
QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent) {
return new QSocketNotifier(socket, static_cast<QSocketNotifier::Type>(param2), parent);
return new QSocketNotifier(static_cast<qintptr>(socket), static_cast<QSocketNotifier::Type>(param2), parent);
}
QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self) {

View File

@ -46,13 +46,13 @@ func newQSocketNotifier_U(h unsafe.Pointer) *QSocketNotifier {
// NewQSocketNotifier constructs a new QSocketNotifier object.
func NewQSocketNotifier(socket uintptr, param2 QSocketNotifier__Type) *QSocketNotifier {
ret := C.QSocketNotifier_new(socket, (C.int)(param2))
ret := C.QSocketNotifier_new((C.intptr_t)(socket), (C.int)(param2))
return newQSocketNotifier(ret)
}
// NewQSocketNotifier2 constructs a new QSocketNotifier object.
func NewQSocketNotifier2(socket uintptr, param2 QSocketNotifier__Type, parent *QObject) *QSocketNotifier {
ret := C.QSocketNotifier_new2(socket, (C.int)(param2), parent.cPointer())
ret := C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2), parent.cPointer())
return newQSocketNotifier(ret)
}