From cfad1477e575f0aae2fe606a8058c8cf9c324b36 Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 26 Oct 2024 10:42:03 +1300 Subject: [PATCH] qt: rebuild (qt 6.7 support) --- qt-extras/scintillaedit/gen_ScintillaEdit.go | 6 + qt/gen_qbitarray.cpp | 4 - qt/gen_qbitarray.go | 7 - qt/gen_qbitarray.h | 1 - qt/gen_qcoreevent.cpp | 17 -- qt/gen_qcoreevent.go | 60 ---- qt/gen_qcoreevent.h | 7 - qt/gen_qfiledialog.cpp | 11 +- qt/gen_qfiledialog.go | 19 +- qt/gen_qfiledialog.h | 3 +- qt/gen_qtimezone.cpp | 8 - qt/gen_qtimezone.go | 8 - qt/gen_qtimezone.h | 2 - qt/gen_qvariant.cpp | 154 +++++++++- qt/gen_qvariant.go | 280 +++++++++++++++++-- qt/gen_qvariant.h | 58 +++- qt6/gen_qarraydata.cpp | 6 + qt6/gen_qbitarray.cpp | 4 - qt6/gen_qbitarray.go | 7 - qt6/gen_qbitarray.h | 1 - qt6/gen_qcoreevent.cpp | 17 -- qt6/gen_qcoreevent.go | 58 ---- qt6/gen_qcoreevent.h | 7 - qt6/gen_qfiledialog.cpp | 11 +- qt6/gen_qfiledialog.go | 19 +- qt6/gen_qfiledialog.h | 3 +- qt6/gen_qpropertyprivate.cpp | 5 - qt6/gen_qpropertyprivate.go | 43 --- qt6/gen_qpropertyprivate.h | 8 - qt6/gen_qsequentialiterable.cpp | 4 + qt6/gen_qsequentialiterable.go | 17 ++ qt6/gen_qsequentialiterable.h | 24 ++ qt6/gen_qshareddata.cpp | 1 - qt6/gen_qtimezone.cpp | 8 - qt6/gen_qtimezone.go | 8 - qt6/gen_qtimezone.h | 2 - qt6/gen_qvariant.cpp | 21 -- qt6/gen_qvariant.go | 61 ---- qt6/gen_qvariant.h | 12 - 39 files changed, 543 insertions(+), 449 deletions(-) create mode 100644 qt6/gen_qsequentialiterable.cpp create mode 100644 qt6/gen_qsequentialiterable.go create mode 100644 qt6/gen_qsequentialiterable.h diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.go b/qt-extras/scintillaedit/gen_ScintillaEdit.go index 4a08b89d..0d05b3b4 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.go +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.go @@ -1662,6 +1662,12 @@ const ( Scintilla__Message__SetBidirectional Scintilla__Message = 2709 ) +type std__nullopt_t___Construct int + +const ( + Std__nullopt_t___Token std__nullopt_t___Construct = 0 +) + type Scintilla__Internal__Surface__Ends int const ( diff --git a/qt/gen_qbitarray.cpp b/qt/gen_qbitarray.cpp index dcf4e6b6..cf6c943f 100644 --- a/qt/gen_qbitarray.cpp +++ b/qt/gen_qbitarray.cpp @@ -116,10 +116,6 @@ void QBitArray_OperatorBitwiseNotAssign(QBitArray* self, QBitArray* param1) { self->operator^=(*param1); } -QBitArray* QBitArray_OperatorBitwiseXor(const QBitArray* self) { - return new QBitArray(self->operator~()); -} - bool QBitArray_OperatorEqual(const QBitArray* self, QBitArray* other) { return self->operator==(*other); } diff --git a/qt/gen_qbitarray.go b/qt/gen_qbitarray.go index 1102ea9f..4319e1de 100644 --- a/qt/gen_qbitarray.go +++ b/qt/gen_qbitarray.go @@ -168,13 +168,6 @@ func (this *QBitArray) OperatorBitwiseNotAssign(param1 *QBitArray) { C.QBitArray_OperatorBitwiseNotAssign(this.h, param1.cPointer()) } -func (this *QBitArray) OperatorBitwiseXor() *QBitArray { - _ret := C.QBitArray_OperatorBitwiseXor(this.h) - _goptr := newQBitArray(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - func (this *QBitArray) OperatorEqual(other *QBitArray) bool { return (bool)(C.QBitArray_OperatorEqual(this.h, other.cPointer())) } diff --git a/qt/gen_qbitarray.h b/qt/gen_qbitarray.h index ebd4674d..5fbcc471 100644 --- a/qt/gen_qbitarray.h +++ b/qt/gen_qbitarray.h @@ -49,7 +49,6 @@ bool QBitArray_OperatorSubscript2(const QBitArray* self, unsigned int i); void QBitArray_OperatorBitwiseAndAssign(QBitArray* self, QBitArray* param1); void QBitArray_OperatorBitwiseOrAssign(QBitArray* self, QBitArray* param1); void QBitArray_OperatorBitwiseNotAssign(QBitArray* self, QBitArray* param1); -QBitArray* QBitArray_OperatorBitwiseXor(const QBitArray* self); bool QBitArray_OperatorEqual(const QBitArray* self, QBitArray* other); bool QBitArray_OperatorNotEqual(const QBitArray* self, QBitArray* other); bool QBitArray_Fill(QBitArray* self, bool val); diff --git a/qt/gen_qcoreevent.cpp b/qt/gen_qcoreevent.cpp index 6c705148..c940beb1 100644 --- a/qt/gen_qcoreevent.cpp +++ b/qt/gen_qcoreevent.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -124,19 +123,3 @@ void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self) { delete self; } -QDeferredDeleteEvent* QDeferredDeleteEvent_new() { - return new QDeferredDeleteEvent(); -} - -QDeferredDeleteEvent* QDeferredDeleteEvent_new2(QDeferredDeleteEvent* param1) { - return new QDeferredDeleteEvent(*param1); -} - -int QDeferredDeleteEvent_LoopLevel(const QDeferredDeleteEvent* self) { - return self->loopLevel(); -} - -void QDeferredDeleteEvent_Delete(QDeferredDeleteEvent* self) { - delete self; -} - diff --git a/qt/gen_qcoreevent.go b/qt/gen_qcoreevent.go index 7bf652e4..9d6deb74 100644 --- a/qt/gen_qcoreevent.go +++ b/qt/gen_qcoreevent.go @@ -478,63 +478,3 @@ func (this *QDynamicPropertyChangeEvent) GoGC() { runtime.KeepAlive(this.h) }) } - -type QDeferredDeleteEvent struct { - h *C.QDeferredDeleteEvent - *QEvent -} - -func (this *QDeferredDeleteEvent) cPointer() *C.QDeferredDeleteEvent { - if this == nil { - return nil - } - return this.h -} - -func (this *QDeferredDeleteEvent) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQDeferredDeleteEvent(h *C.QDeferredDeleteEvent) *QDeferredDeleteEvent { - if h == nil { - return nil - } - return &QDeferredDeleteEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} -} - -func UnsafeNewQDeferredDeleteEvent(h unsafe.Pointer) *QDeferredDeleteEvent { - return newQDeferredDeleteEvent((*C.QDeferredDeleteEvent)(h)) -} - -// NewQDeferredDeleteEvent constructs a new QDeferredDeleteEvent object. -func NewQDeferredDeleteEvent() *QDeferredDeleteEvent { - ret := C.QDeferredDeleteEvent_new() - return newQDeferredDeleteEvent(ret) -} - -// NewQDeferredDeleteEvent2 constructs a new QDeferredDeleteEvent object. -func NewQDeferredDeleteEvent2(param1 *QDeferredDeleteEvent) *QDeferredDeleteEvent { - ret := C.QDeferredDeleteEvent_new2(param1.cPointer()) - return newQDeferredDeleteEvent(ret) -} - -func (this *QDeferredDeleteEvent) LoopLevel() int { - return (int)(C.QDeferredDeleteEvent_LoopLevel(this.h)) -} - -// Delete this object from C++ memory. -func (this *QDeferredDeleteEvent) Delete() { - C.QDeferredDeleteEvent_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QDeferredDeleteEvent) GoGC() { - runtime.SetFinalizer(this, func(this *QDeferredDeleteEvent) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt/gen_qcoreevent.h b/qt/gen_qcoreevent.h index f767a56c..d3a9c71c 100644 --- a/qt/gen_qcoreevent.h +++ b/qt/gen_qcoreevent.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QByteArray; class QChildEvent; -class QDeferredDeleteEvent; class QDynamicPropertyChangeEvent; class QEvent; class QObject; @@ -24,7 +23,6 @@ class QTimerEvent; #else typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; -typedef struct QDeferredDeleteEvent QDeferredDeleteEvent; typedef struct QDynamicPropertyChangeEvent QDynamicPropertyChangeEvent; typedef struct QEvent QEvent; typedef struct QObject QObject; @@ -62,11 +60,6 @@ QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new2(QDynamicPropertyCh struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self); void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self); -QDeferredDeleteEvent* QDeferredDeleteEvent_new(); -QDeferredDeleteEvent* QDeferredDeleteEvent_new2(QDeferredDeleteEvent* param1); -int QDeferredDeleteEvent_LoopLevel(const QDeferredDeleteEvent* self); -void QDeferredDeleteEvent_Delete(QDeferredDeleteEvent* self); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt/gen_qfiledialog.cpp b/qt/gen_qfiledialog.cpp index 2c0eb224..49d01e54 100644 --- a/qt/gen_qfiledialog.cpp +++ b/qt/gen_qfiledialog.cpp @@ -734,9 +734,10 @@ struct miqt_array* QFileDialog_GetOpenFileUrls() { return _out; } -void QFileDialog_SaveFileContent(struct miqt_string fileContent) { +void QFileDialog_SaveFileContent(struct miqt_string fileContent, struct miqt_string fileNameHint) { QByteArray fileContent_QByteArray(fileContent.data, fileContent.len); - QFileDialog::saveFileContent(fileContent_QByteArray); + QString fileNameHint_QString = QString::fromUtf8(fileNameHint.data, fileNameHint.len); + QFileDialog::saveFileContent(fileContent_QByteArray, fileNameHint_QString); } struct miqt_string QFileDialog_Tr2(const char* s, const char* c) { @@ -1149,12 +1150,6 @@ struct miqt_array* QFileDialog_GetOpenFileUrls4(QWidget* parent, struct miqt_str return _out; } -void QFileDialog_SaveFileContent2(struct miqt_string fileContent, struct miqt_string fileNameHint) { - QByteArray fileContent_QByteArray(fileContent.data, fileContent.len); - QString fileNameHint_QString = QString::fromUtf8(fileNameHint.data, fileNameHint.len); - QFileDialog::saveFileContent(fileContent_QByteArray, fileNameHint_QString); -} - void QFileDialog_Delete(QFileDialog* self) { delete self; } diff --git a/qt/gen_qfiledialog.go b/qt/gen_qfiledialog.go index ea380ed4..298d8214 100644 --- a/qt/gen_qfiledialog.go +++ b/qt/gen_qfiledialog.go @@ -903,11 +903,15 @@ func QFileDialog_GetOpenFileUrls() []QUrl { return _ret } -func QFileDialog_SaveFileContent(fileContent []byte) { +func QFileDialog_SaveFileContent(fileContent []byte, fileNameHint string) { fileContent_alias := C.struct_miqt_string{} fileContent_alias.data = (*C.char)(unsafe.Pointer(&fileContent[0])) fileContent_alias.len = C.size_t(len(fileContent)) - C.QFileDialog_SaveFileContent(fileContent_alias) + fileNameHint_ms := C.struct_miqt_string{} + fileNameHint_ms.data = C.CString(fileNameHint) + fileNameHint_ms.len = C.size_t(len(fileNameHint)) + defer C.free(unsafe.Pointer(fileNameHint_ms.data)) + C.QFileDialog_SaveFileContent(fileContent_alias, fileNameHint_ms) } func QFileDialog_Tr2(s string, c string) string { @@ -1413,17 +1417,6 @@ func QFileDialog_GetOpenFileUrls4(parent *QWidget, caption string, dir *QUrl, fi return _ret } -func QFileDialog_SaveFileContent2(fileContent []byte, fileNameHint string) { - fileContent_alias := C.struct_miqt_string{} - fileContent_alias.data = (*C.char)(unsafe.Pointer(&fileContent[0])) - fileContent_alias.len = C.size_t(len(fileContent)) - fileNameHint_ms := C.struct_miqt_string{} - fileNameHint_ms.data = C.CString(fileNameHint) - fileNameHint_ms.len = C.size_t(len(fileNameHint)) - defer C.free(unsafe.Pointer(fileNameHint_ms.data)) - C.QFileDialog_SaveFileContent2(fileContent_alias, fileNameHint_ms) -} - // Delete this object from C++ memory. func (this *QFileDialog) Delete() { C.QFileDialog_Delete(this.h) diff --git a/qt/gen_qfiledialog.h b/qt/gen_qfiledialog.h index 5392fa12..096c002e 100644 --- a/qt/gen_qfiledialog.h +++ b/qt/gen_qfiledialog.h @@ -128,7 +128,7 @@ struct miqt_string QFileDialog_GetExistingDirectory(); QUrl* QFileDialog_GetExistingDirectoryUrl(); struct miqt_array* QFileDialog_GetOpenFileNames(); struct miqt_array* QFileDialog_GetOpenFileUrls(); -void QFileDialog_SaveFileContent(struct miqt_string fileContent); +void QFileDialog_SaveFileContent(struct miqt_string fileContent, struct miqt_string fileNameHint); struct miqt_string QFileDialog_Tr2(const char* s, const char* c); struct miqt_string QFileDialog_Tr3(const char* s, const char* c, int n); struct miqt_string QFileDialog_TrUtf82(const char* s, const char* c); @@ -167,7 +167,6 @@ struct miqt_array* QFileDialog_GetOpenFileUrls1(QWidget* parent); struct miqt_array* QFileDialog_GetOpenFileUrls2(QWidget* parent, struct miqt_string caption); struct miqt_array* QFileDialog_GetOpenFileUrls3(QWidget* parent, struct miqt_string caption, QUrl* dir); struct miqt_array* QFileDialog_GetOpenFileUrls4(QWidget* parent, struct miqt_string caption, QUrl* dir, struct miqt_string filter); -void QFileDialog_SaveFileContent2(struct miqt_string fileContent, struct miqt_string fileNameHint); void QFileDialog_Delete(QFileDialog* self); #ifdef __cplusplus diff --git a/qt/gen_qtimezone.cpp b/qt/gen_qtimezone.cpp index 9eae8cc0..15b54539 100644 --- a/qt/gen_qtimezone.cpp +++ b/qt/gen_qtimezone.cpp @@ -58,14 +58,6 @@ void QTimeZone_Swap(QTimeZone* self, QTimeZone* other) { self->swap(*other); } -bool QTimeZone_OperatorEqual(const QTimeZone* self, QTimeZone* other) { - return self->operator==(*other); -} - -bool QTimeZone_OperatorNotEqual(const QTimeZone* self, QTimeZone* other) { - return self->operator!=(*other); -} - bool QTimeZone_IsValid(const QTimeZone* self) { return self->isValid(); } diff --git a/qt/gen_qtimezone.go b/qt/gen_qtimezone.go index 7a7cbb14..e43c6710 100644 --- a/qt/gen_qtimezone.go +++ b/qt/gen_qtimezone.go @@ -156,14 +156,6 @@ func (this *QTimeZone) Swap(other *QTimeZone) { C.QTimeZone_Swap(this.h, other.cPointer()) } -func (this *QTimeZone) OperatorEqual(other *QTimeZone) bool { - return (bool)(C.QTimeZone_OperatorEqual(this.h, other.cPointer())) -} - -func (this *QTimeZone) OperatorNotEqual(other *QTimeZone) bool { - return (bool)(C.QTimeZone_OperatorNotEqual(this.h, other.cPointer())) -} - func (this *QTimeZone) IsValid() bool { return (bool)(C.QTimeZone_IsValid(this.h)) } diff --git a/qt/gen_qtimezone.h b/qt/gen_qtimezone.h index 897a5334..3e019987 100644 --- a/qt/gen_qtimezone.h +++ b/qt/gen_qtimezone.h @@ -40,8 +40,6 @@ QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct m QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment); void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other); void QTimeZone_Swap(QTimeZone* self, QTimeZone* other); -bool QTimeZone_OperatorEqual(const QTimeZone* self, QTimeZone* other); -bool QTimeZone_OperatorNotEqual(const QTimeZone* self, QTimeZone* other); bool QTimeZone_IsValid(const QTimeZone* self); struct miqt_string QTimeZone_Id(const QTimeZone* self); int QTimeZone_Country(const QTimeZone* self); diff --git a/qt/gen_qvariant.cpp b/qt/gen_qvariant.cpp index 2ee56907..e7f868fd 100644 --- a/qt/gen_qvariant.cpp +++ b/qt/gen_qvariant.cpp @@ -1,3 +1,4 @@ +#define WORKAROUND_INNER_CLASS_DEFINITION_QAssociativeIterable__const_iterator #include #include #include @@ -21,6 +22,7 @@ #include #include #include +#define WORKAROUND_INNER_CLASS_DEFINITION_QSequentialIterable__const_iterator #include #include #include @@ -31,7 +33,7 @@ #include #include #define WORKAROUND_INNER_CLASS_DEFINITION_QVariant__Handler -#define WORKAROUND_INNER_CLASS_DEFINITION_QVariant__PrivateShared +#define WORKAROUND_INNER_CLASS_DEFINITION_QVariant__Private__Data #include #include #include "gen_qvariant.h" @@ -540,11 +542,19 @@ void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self) { delete self; } -QVariant__PrivateShared* QVariant__PrivateShared_new(void* v) { - return new QVariant::PrivateShared(v); +QVariant__Private__Data* QVariant__Private__Data_new() { + return new QVariant::Private::Data(); } -void QVariant__PrivateShared_Delete(QVariant__PrivateShared* self) { +QVariant__Private__Data* QVariant__Private__Data_new2(QVariant__Private__Data* param1) { + return new QVariant::Private::Data(*param1); +} + +void QVariant__Private__Data_OperatorAssign(QVariant__Private__Data* self, QVariant__Private__Data* param1) { + self->operator=(*param1); +} + +void QVariant__Private__Data_Delete(QVariant__Private__Data* self) { delete self; } @@ -552,3 +562,139 @@ void QVariant__Handler_Delete(QVariant__Handler* self) { delete self; } +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other) { + return new QSequentialIterable::const_iterator(*other); +} + +void QSequentialIterable__const_iterator_OperatorAssign(QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* other) { + self->operator=(*other); +} + +QVariant* QSequentialIterable__const_iterator_OperatorMultiply(const QSequentialIterable__const_iterator* self) { + return new QVariant(self->operator*()); +} + +bool QSequentialIterable__const_iterator_OperatorEqual(const QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* o) { + return self->operator==(*o); +} + +bool QSequentialIterable__const_iterator_OperatorNotEqual(const QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* o) { + return self->operator!=(*o); +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlusPlus(QSequentialIterable__const_iterator* self) { + QSequentialIterable::const_iterator& _ret = self->operator++(); + // Cast returned reference into pointer + return &_ret; +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlusPlusWithInt(QSequentialIterable__const_iterator* self, int param1) { + return new QSequentialIterable::const_iterator(self->operator++(static_cast(param1))); +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinusMinus(QSequentialIterable__const_iterator* self) { + QSequentialIterable::const_iterator& _ret = self->operator--(); + // Cast returned reference into pointer + return &_ret; +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinusMinusWithInt(QSequentialIterable__const_iterator* self, int param1) { + return new QSequentialIterable::const_iterator(self->operator--(static_cast(param1))); +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlusAssign(QSequentialIterable__const_iterator* self, int j) { + QSequentialIterable::const_iterator& _ret = self->operator+=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinusAssign(QSequentialIterable__const_iterator* self, int j) { + QSequentialIterable::const_iterator& _ret = self->operator-=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlus(const QSequentialIterable__const_iterator* self, int j) { + return new QSequentialIterable::const_iterator(self->operator+(static_cast(j))); +} + +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinus(const QSequentialIterable__const_iterator* self, int j) { + return new QSequentialIterable::const_iterator(self->operator-(static_cast(j))); +} + +void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_iterator* self) { + delete self; +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other) { + return new QAssociativeIterable::const_iterator(*other); +} + +void QAssociativeIterable__const_iterator_OperatorAssign(QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* other) { + self->operator=(*other); +} + +QVariant* QAssociativeIterable__const_iterator_Key(const QAssociativeIterable__const_iterator* self) { + return new QVariant(self->key()); +} + +QVariant* QAssociativeIterable__const_iterator_Value(const QAssociativeIterable__const_iterator* self) { + return new QVariant(self->value()); +} + +QVariant* QAssociativeIterable__const_iterator_OperatorMultiply(const QAssociativeIterable__const_iterator* self) { + return new QVariant(self->operator*()); +} + +bool QAssociativeIterable__const_iterator_OperatorEqual(const QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* o) { + return self->operator==(*o); +} + +bool QAssociativeIterable__const_iterator_OperatorNotEqual(const QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* o) { + return self->operator!=(*o); +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlusPlus(QAssociativeIterable__const_iterator* self) { + QAssociativeIterable::const_iterator& _ret = self->operator++(); + // Cast returned reference into pointer + return &_ret; +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlusPlusWithInt(QAssociativeIterable__const_iterator* self, int param1) { + return new QAssociativeIterable::const_iterator(self->operator++(static_cast(param1))); +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinusMinus(QAssociativeIterable__const_iterator* self) { + QAssociativeIterable::const_iterator& _ret = self->operator--(); + // Cast returned reference into pointer + return &_ret; +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinusMinusWithInt(QAssociativeIterable__const_iterator* self, int param1) { + return new QAssociativeIterable::const_iterator(self->operator--(static_cast(param1))); +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlusAssign(QAssociativeIterable__const_iterator* self, int j) { + QAssociativeIterable::const_iterator& _ret = self->operator+=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinusAssign(QAssociativeIterable__const_iterator* self, int j) { + QAssociativeIterable::const_iterator& _ret = self->operator-=(static_cast(j)); + // Cast returned reference into pointer + return &_ret; +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlus(const QAssociativeIterable__const_iterator* self, int j) { + return new QAssociativeIterable::const_iterator(self->operator+(static_cast(j))); +} + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinus(const QAssociativeIterable__const_iterator* self, int j) { + return new QAssociativeIterable::const_iterator(self->operator-(static_cast(j))); +} + +void QAssociativeIterable__const_iterator_Delete(QAssociativeIterable__const_iterator* self) { + delete self; +} + diff --git a/qt/gen_qvariant.go b/qt/gen_qvariant.go index b3a0da7c..8c67a7d6 100644 --- a/qt/gen_qvariant.go +++ b/qt/gen_qvariant.go @@ -818,50 +818,60 @@ func (this *QVariantComparisonHelper) GoGC() { }) } -type QVariant__PrivateShared struct { - h *C.QVariant__PrivateShared +type QVariant__Private__Data struct { + h *C.QVariant__Private__Data } -func (this *QVariant__PrivateShared) cPointer() *C.QVariant__PrivateShared { +func (this *QVariant__Private__Data) cPointer() *C.QVariant__Private__Data { if this == nil { return nil } return this.h } -func (this *QVariant__PrivateShared) UnsafePointer() unsafe.Pointer { +func (this *QVariant__Private__Data) UnsafePointer() unsafe.Pointer { if this == nil { return nil } return unsafe.Pointer(this.h) } -func newQVariant__PrivateShared(h *C.QVariant__PrivateShared) *QVariant__PrivateShared { +func newQVariant__Private__Data(h *C.QVariant__Private__Data) *QVariant__Private__Data { if h == nil { return nil } - return &QVariant__PrivateShared{h: h} + return &QVariant__Private__Data{h: h} } -func UnsafeNewQVariant__PrivateShared(h unsafe.Pointer) *QVariant__PrivateShared { - return newQVariant__PrivateShared((*C.QVariant__PrivateShared)(h)) +func UnsafeNewQVariant__Private__Data(h unsafe.Pointer) *QVariant__Private__Data { + return newQVariant__Private__Data((*C.QVariant__Private__Data)(h)) } -// NewQVariant__PrivateShared constructs a new QVariant::PrivateShared object. -func NewQVariant__PrivateShared(v unsafe.Pointer) *QVariant__PrivateShared { - ret := C.QVariant__PrivateShared_new(v) - return newQVariant__PrivateShared(ret) +// NewQVariant__Private__Data constructs a new QVariant::Private::Data object. +func NewQVariant__Private__Data() *QVariant__Private__Data { + ret := C.QVariant__Private__Data_new() + return newQVariant__Private__Data(ret) +} + +// NewQVariant__Private__Data2 constructs a new QVariant::Private::Data object. +func NewQVariant__Private__Data2(param1 *QVariant__Private__Data) *QVariant__Private__Data { + ret := C.QVariant__Private__Data_new2(param1.cPointer()) + return newQVariant__Private__Data(ret) +} + +func (this *QVariant__Private__Data) OperatorAssign(param1 *QVariant__Private__Data) { + C.QVariant__Private__Data_OperatorAssign(this.h, param1.cPointer()) } // Delete this object from C++ memory. -func (this *QVariant__PrivateShared) Delete() { - C.QVariant__PrivateShared_Delete(this.h) +func (this *QVariant__Private__Data) Delete() { + C.QVariant__Private__Data_Delete(this.h) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. -func (this *QVariant__PrivateShared) GoGC() { - runtime.SetFinalizer(this, func(this *QVariant__PrivateShared) { +func (this *QVariant__Private__Data) GoGC() { + runtime.SetFinalizer(this, func(this *QVariant__Private__Data) { this.Delete() runtime.KeepAlive(this.h) }) @@ -909,3 +919,241 @@ func (this *QVariant__Handler) GoGC() { runtime.KeepAlive(this.h) }) } + +type QSequentialIterable__const_iterator struct { + h *C.QSequentialIterable__const_iterator +} + +func (this *QSequentialIterable__const_iterator) cPointer() *C.QSequentialIterable__const_iterator { + if this == nil { + return nil + } + return this.h +} + +func (this *QSequentialIterable__const_iterator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +func newQSequentialIterable__const_iterator(h *C.QSequentialIterable__const_iterator) *QSequentialIterable__const_iterator { + if h == nil { + return nil + } + return &QSequentialIterable__const_iterator{h: h} +} + +func UnsafeNewQSequentialIterable__const_iterator(h unsafe.Pointer) *QSequentialIterable__const_iterator { + return newQSequentialIterable__const_iterator((*C.QSequentialIterable__const_iterator)(h)) +} + +// NewQSequentialIterable__const_iterator constructs a new QSequentialIterable::const_iterator object. +func NewQSequentialIterable__const_iterator(other *QSequentialIterable__const_iterator) *QSequentialIterable__const_iterator { + ret := C.QSequentialIterable__const_iterator_new(other.cPointer()) + return newQSequentialIterable__const_iterator(ret) +} + +func (this *QSequentialIterable__const_iterator) OperatorAssign(other *QSequentialIterable__const_iterator) { + C.QSequentialIterable__const_iterator_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QSequentialIterable__const_iterator) OperatorMultiply() *QVariant { + _ret := C.QSequentialIterable__const_iterator_OperatorMultiply(this.h) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSequentialIterable__const_iterator) OperatorEqual(o *QSequentialIterable__const_iterator) bool { + return (bool)(C.QSequentialIterable__const_iterator_OperatorEqual(this.h, o.cPointer())) +} + +func (this *QSequentialIterable__const_iterator) OperatorNotEqual(o *QSequentialIterable__const_iterator) bool { + return (bool)(C.QSequentialIterable__const_iterator_OperatorNotEqual(this.h, o.cPointer())) +} + +func (this *QSequentialIterable__const_iterator) OperatorPlusPlus() *QSequentialIterable__const_iterator { + return UnsafeNewQSequentialIterable__const_iterator(unsafe.Pointer(C.QSequentialIterable__const_iterator_OperatorPlusPlus(this.h))) +} + +func (this *QSequentialIterable__const_iterator) OperatorPlusPlusWithInt(param1 int) *QSequentialIterable__const_iterator { + _ret := C.QSequentialIterable__const_iterator_OperatorPlusPlusWithInt(this.h, (C.int)(param1)) + _goptr := newQSequentialIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSequentialIterable__const_iterator) OperatorMinusMinus() *QSequentialIterable__const_iterator { + return UnsafeNewQSequentialIterable__const_iterator(unsafe.Pointer(C.QSequentialIterable__const_iterator_OperatorMinusMinus(this.h))) +} + +func (this *QSequentialIterable__const_iterator) OperatorMinusMinusWithInt(param1 int) *QSequentialIterable__const_iterator { + _ret := C.QSequentialIterable__const_iterator_OperatorMinusMinusWithInt(this.h, (C.int)(param1)) + _goptr := newQSequentialIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSequentialIterable__const_iterator) OperatorPlusAssign(j int) *QSequentialIterable__const_iterator { + return UnsafeNewQSequentialIterable__const_iterator(unsafe.Pointer(C.QSequentialIterable__const_iterator_OperatorPlusAssign(this.h, (C.int)(j)))) +} + +func (this *QSequentialIterable__const_iterator) OperatorMinusAssign(j int) *QSequentialIterable__const_iterator { + return UnsafeNewQSequentialIterable__const_iterator(unsafe.Pointer(C.QSequentialIterable__const_iterator_OperatorMinusAssign(this.h, (C.int)(j)))) +} + +func (this *QSequentialIterable__const_iterator) OperatorPlus(j int) *QSequentialIterable__const_iterator { + _ret := C.QSequentialIterable__const_iterator_OperatorPlus(this.h, (C.int)(j)) + _goptr := newQSequentialIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QSequentialIterable__const_iterator) OperatorMinus(j int) *QSequentialIterable__const_iterator { + _ret := C.QSequentialIterable__const_iterator_OperatorMinus(this.h, (C.int)(j)) + _goptr := newQSequentialIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QSequentialIterable__const_iterator) Delete() { + C.QSequentialIterable__const_iterator_Delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QSequentialIterable__const_iterator) GoGC() { + runtime.SetFinalizer(this, func(this *QSequentialIterable__const_iterator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} + +type QAssociativeIterable__const_iterator struct { + h *C.QAssociativeIterable__const_iterator +} + +func (this *QAssociativeIterable__const_iterator) cPointer() *C.QAssociativeIterable__const_iterator { + if this == nil { + return nil + } + return this.h +} + +func (this *QAssociativeIterable__const_iterator) UnsafePointer() unsafe.Pointer { + if this == nil { + return nil + } + return unsafe.Pointer(this.h) +} + +func newQAssociativeIterable__const_iterator(h *C.QAssociativeIterable__const_iterator) *QAssociativeIterable__const_iterator { + if h == nil { + return nil + } + return &QAssociativeIterable__const_iterator{h: h} +} + +func UnsafeNewQAssociativeIterable__const_iterator(h unsafe.Pointer) *QAssociativeIterable__const_iterator { + return newQAssociativeIterable__const_iterator((*C.QAssociativeIterable__const_iterator)(h)) +} + +// NewQAssociativeIterable__const_iterator constructs a new QAssociativeIterable::const_iterator object. +func NewQAssociativeIterable__const_iterator(other *QAssociativeIterable__const_iterator) *QAssociativeIterable__const_iterator { + ret := C.QAssociativeIterable__const_iterator_new(other.cPointer()) + return newQAssociativeIterable__const_iterator(ret) +} + +func (this *QAssociativeIterable__const_iterator) OperatorAssign(other *QAssociativeIterable__const_iterator) { + C.QAssociativeIterable__const_iterator_OperatorAssign(this.h, other.cPointer()) +} + +func (this *QAssociativeIterable__const_iterator) Key() *QVariant { + _ret := C.QAssociativeIterable__const_iterator_Key(this.h) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAssociativeIterable__const_iterator) Value() *QVariant { + _ret := C.QAssociativeIterable__const_iterator_Value(this.h) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAssociativeIterable__const_iterator) OperatorMultiply() *QVariant { + _ret := C.QAssociativeIterable__const_iterator_OperatorMultiply(this.h) + _goptr := newQVariant(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAssociativeIterable__const_iterator) OperatorEqual(o *QAssociativeIterable__const_iterator) bool { + return (bool)(C.QAssociativeIterable__const_iterator_OperatorEqual(this.h, o.cPointer())) +} + +func (this *QAssociativeIterable__const_iterator) OperatorNotEqual(o *QAssociativeIterable__const_iterator) bool { + return (bool)(C.QAssociativeIterable__const_iterator_OperatorNotEqual(this.h, o.cPointer())) +} + +func (this *QAssociativeIterable__const_iterator) OperatorPlusPlus() *QAssociativeIterable__const_iterator { + return UnsafeNewQAssociativeIterable__const_iterator(unsafe.Pointer(C.QAssociativeIterable__const_iterator_OperatorPlusPlus(this.h))) +} + +func (this *QAssociativeIterable__const_iterator) OperatorPlusPlusWithInt(param1 int) *QAssociativeIterable__const_iterator { + _ret := C.QAssociativeIterable__const_iterator_OperatorPlusPlusWithInt(this.h, (C.int)(param1)) + _goptr := newQAssociativeIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAssociativeIterable__const_iterator) OperatorMinusMinus() *QAssociativeIterable__const_iterator { + return UnsafeNewQAssociativeIterable__const_iterator(unsafe.Pointer(C.QAssociativeIterable__const_iterator_OperatorMinusMinus(this.h))) +} + +func (this *QAssociativeIterable__const_iterator) OperatorMinusMinusWithInt(param1 int) *QAssociativeIterable__const_iterator { + _ret := C.QAssociativeIterable__const_iterator_OperatorMinusMinusWithInt(this.h, (C.int)(param1)) + _goptr := newQAssociativeIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAssociativeIterable__const_iterator) OperatorPlusAssign(j int) *QAssociativeIterable__const_iterator { + return UnsafeNewQAssociativeIterable__const_iterator(unsafe.Pointer(C.QAssociativeIterable__const_iterator_OperatorPlusAssign(this.h, (C.int)(j)))) +} + +func (this *QAssociativeIterable__const_iterator) OperatorMinusAssign(j int) *QAssociativeIterable__const_iterator { + return UnsafeNewQAssociativeIterable__const_iterator(unsafe.Pointer(C.QAssociativeIterable__const_iterator_OperatorMinusAssign(this.h, (C.int)(j)))) +} + +func (this *QAssociativeIterable__const_iterator) OperatorPlus(j int) *QAssociativeIterable__const_iterator { + _ret := C.QAssociativeIterable__const_iterator_OperatorPlus(this.h, (C.int)(j)) + _goptr := newQAssociativeIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +func (this *QAssociativeIterable__const_iterator) OperatorMinus(j int) *QAssociativeIterable__const_iterator { + _ret := C.QAssociativeIterable__const_iterator_OperatorMinus(this.h, (C.int)(j)) + _goptr := newQAssociativeIterable__const_iterator(_ret) + _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer + return _goptr +} + +// Delete this object from C++ memory. +func (this *QAssociativeIterable__const_iterator) Delete() { + C.QAssociativeIterable__const_iterator_Delete(this.h) +} + +// GoGC adds a Go Finalizer to this pointer, so that it will be deleted +// from C++ memory once it is unreachable from Go memory. +func (this *QAssociativeIterable__const_iterator) GoGC() { + runtime.SetFinalizer(this, func(this *QAssociativeIterable__const_iterator) { + this.Delete() + runtime.KeepAlive(this.h) + }) +} diff --git a/qt/gen_qvariant.h b/qt/gen_qvariant.h index 3efa445d..5f9b5213 100644 --- a/qt/gen_qvariant.h +++ b/qt/gen_qvariant.h @@ -14,6 +14,11 @@ extern "C" { #endif #ifdef __cplusplus +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QAssociativeIterable__const_iterator) +typedef QAssociativeIterable::const_iterator QAssociativeIterable__const_iterator; +#else +class QAssociativeIterable__const_iterator; +#endif class QBitArray; class QByteArray; class QChar; @@ -36,6 +41,11 @@ class QRect; class QRectF; class QRegExp; class QRegularExpression; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QSequentialIterable__const_iterator) +typedef QSequentialIterable::const_iterator QSequentialIterable__const_iterator; +#else +class QSequentialIterable__const_iterator; +#endif class QSize; class QSizeF; class QTime; @@ -47,13 +57,14 @@ typedef QVariant::Handler QVariant__Handler; #else class QVariant__Handler; #endif -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QVariant__PrivateShared) -typedef QVariant::PrivateShared QVariant__PrivateShared; +#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QVariant__Private__Data) +typedef QVariant::Private::Data QVariant__Private__Data; #else -class QVariant__PrivateShared; +class QVariant__Private__Data; #endif class QVariantComparisonHelper; #else +typedef struct QAssociativeIterable__const_iterator QAssociativeIterable__const_iterator; typedef struct QBitArray QBitArray; typedef struct QByteArray QByteArray; typedef struct QChar QChar; @@ -76,6 +87,7 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; typedef struct QRegExp QRegExp; typedef struct QRegularExpression QRegularExpression; +typedef struct QSequentialIterable__const_iterator QSequentialIterable__const_iterator; typedef struct QSize QSize; typedef struct QSizeF QSizeF; typedef struct QTime QTime; @@ -83,7 +95,7 @@ typedef struct QUrl QUrl; typedef struct QUuid QUuid; typedef struct QVariant QVariant; typedef struct QVariant__Handler QVariant__Handler; -typedef struct QVariant__PrivateShared QVariant__PrivateShared; +typedef struct QVariant__Private__Data QVariant__Private__Data; typedef struct QVariantComparisonHelper QVariantComparisonHelper; #endif @@ -203,11 +215,45 @@ QVariantComparisonHelper* QVariantComparisonHelper_new(QVariant* varVal); QVariantComparisonHelper* QVariantComparisonHelper_new2(QVariantComparisonHelper* param1); void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self); -QVariant__PrivateShared* QVariant__PrivateShared_new(void* v); -void QVariant__PrivateShared_Delete(QVariant__PrivateShared* self); +QVariant__Private__Data* QVariant__Private__Data_new(); +QVariant__Private__Data* QVariant__Private__Data_new2(QVariant__Private__Data* param1); +void QVariant__Private__Data_OperatorAssign(QVariant__Private__Data* self, QVariant__Private__Data* param1); +void QVariant__Private__Data_Delete(QVariant__Private__Data* self); void QVariant__Handler_Delete(QVariant__Handler* self); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other); +void QSequentialIterable__const_iterator_OperatorAssign(QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* other); +QVariant* QSequentialIterable__const_iterator_OperatorMultiply(const QSequentialIterable__const_iterator* self); +bool QSequentialIterable__const_iterator_OperatorEqual(const QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* o); +bool QSequentialIterable__const_iterator_OperatorNotEqual(const QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* o); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlusPlus(QSequentialIterable__const_iterator* self); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlusPlusWithInt(QSequentialIterable__const_iterator* self, int param1); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinusMinus(QSequentialIterable__const_iterator* self); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinusMinusWithInt(QSequentialIterable__const_iterator* self, int param1); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlusAssign(QSequentialIterable__const_iterator* self, int j); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinusAssign(QSequentialIterable__const_iterator* self, int j); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorPlus(const QSequentialIterable__const_iterator* self, int j); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinus(const QSequentialIterable__const_iterator* self, int j); +void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_iterator* self); + +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other); +void QAssociativeIterable__const_iterator_OperatorAssign(QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* other); +QVariant* QAssociativeIterable__const_iterator_Key(const QAssociativeIterable__const_iterator* self); +QVariant* QAssociativeIterable__const_iterator_Value(const QAssociativeIterable__const_iterator* self); +QVariant* QAssociativeIterable__const_iterator_OperatorMultiply(const QAssociativeIterable__const_iterator* self); +bool QAssociativeIterable__const_iterator_OperatorEqual(const QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* o); +bool QAssociativeIterable__const_iterator_OperatorNotEqual(const QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* o); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlusPlus(QAssociativeIterable__const_iterator* self); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlusPlusWithInt(QAssociativeIterable__const_iterator* self, int param1); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinusMinus(QAssociativeIterable__const_iterator* self); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinusMinusWithInt(QAssociativeIterable__const_iterator* self, int param1); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlusAssign(QAssociativeIterable__const_iterator* self, int j); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinusAssign(QAssociativeIterable__const_iterator* self, int j); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorPlus(const QAssociativeIterable__const_iterator* self, int j); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_OperatorMinus(const QAssociativeIterable__const_iterator* self, int j); +void QAssociativeIterable__const_iterator_Delete(QAssociativeIterable__const_iterator* self); + #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qarraydata.cpp b/qt6/gen_qarraydata.cpp index 63a4d3a1..03859288 100644 --- a/qt6/gen_qarraydata.cpp +++ b/qt6/gen_qarraydata.cpp @@ -27,7 +27,13 @@ bool QArrayData_IsShared(const QArrayData* self) { } bool QArrayData_NeedsDetach(const QArrayData* self) { + +// This method was changed from const to non-const in Qt 6.7 +#if QT_VERSION < QT_VERSION_CHECK(6,7,0) return self->needsDetach(); +#else + return const_cast(self)->needsDetach(); +#endif } ptrdiff_t QArrayData_DetachCapacity(const QArrayData* self, ptrdiff_t newSize) { diff --git a/qt6/gen_qbitarray.cpp b/qt6/gen_qbitarray.cpp index 5db31aa4..c9fa0fd2 100644 --- a/qt6/gen_qbitarray.cpp +++ b/qt6/gen_qbitarray.cpp @@ -111,10 +111,6 @@ void QBitArray_OperatorBitwiseNotAssign(QBitArray* self, QBitArray* param1) { self->operator^=(*param1); } -QBitArray* QBitArray_OperatorBitwiseXor(const QBitArray* self) { - return new QBitArray(self->operator~()); -} - bool QBitArray_OperatorEqual(const QBitArray* self, QBitArray* other) { return self->operator==(*other); } diff --git a/qt6/gen_qbitarray.go b/qt6/gen_qbitarray.go index 16959108..55c927f7 100644 --- a/qt6/gen_qbitarray.go +++ b/qt6/gen_qbitarray.go @@ -157,13 +157,6 @@ func (this *QBitArray) OperatorBitwiseNotAssign(param1 *QBitArray) { C.QBitArray_OperatorBitwiseNotAssign(this.h, param1.cPointer()) } -func (this *QBitArray) OperatorBitwiseXor() *QBitArray { - _ret := C.QBitArray_OperatorBitwiseXor(this.h) - _goptr := newQBitArray(_ret) - _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer - return _goptr -} - func (this *QBitArray) OperatorEqual(other *QBitArray) bool { return (bool)(C.QBitArray_OperatorEqual(this.h, other.cPointer())) } diff --git a/qt6/gen_qbitarray.h b/qt6/gen_qbitarray.h index 6cd4943c..3666d140 100644 --- a/qt6/gen_qbitarray.h +++ b/qt6/gen_qbitarray.h @@ -47,7 +47,6 @@ bool QBitArray_OperatorSubscriptWithQsizetype(const QBitArray* self, ptrdiff_t i void QBitArray_OperatorBitwiseAndAssign(QBitArray* self, QBitArray* param1); void QBitArray_OperatorBitwiseOrAssign(QBitArray* self, QBitArray* param1); void QBitArray_OperatorBitwiseNotAssign(QBitArray* self, QBitArray* param1); -QBitArray* QBitArray_OperatorBitwiseXor(const QBitArray* self); bool QBitArray_OperatorEqual(const QBitArray* self, QBitArray* other); bool QBitArray_OperatorNotEqual(const QBitArray* self, QBitArray* other); bool QBitArray_Fill(QBitArray* self, bool val); diff --git a/qt6/gen_qcoreevent.cpp b/qt6/gen_qcoreevent.cpp index 5da626b3..280ebfa0 100644 --- a/qt6/gen_qcoreevent.cpp +++ b/qt6/gen_qcoreevent.cpp @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -132,19 +131,3 @@ void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self) { delete self; } -QDeferredDeleteEvent* QDeferredDeleteEvent_new() { - return new QDeferredDeleteEvent(); -} - -QDeferredDeleteEvent* QDeferredDeleteEvent_Clone(const QDeferredDeleteEvent* self) { - return self->clone(); -} - -int QDeferredDeleteEvent_LoopLevel(const QDeferredDeleteEvent* self) { - return self->loopLevel(); -} - -void QDeferredDeleteEvent_Delete(QDeferredDeleteEvent* self) { - delete self; -} - diff --git a/qt6/gen_qcoreevent.go b/qt6/gen_qcoreevent.go index 63fd1665..5666b7ca 100644 --- a/qt6/gen_qcoreevent.go +++ b/qt6/gen_qcoreevent.go @@ -479,61 +479,3 @@ func (this *QDynamicPropertyChangeEvent) GoGC() { runtime.KeepAlive(this.h) }) } - -type QDeferredDeleteEvent struct { - h *C.QDeferredDeleteEvent - *QEvent -} - -func (this *QDeferredDeleteEvent) cPointer() *C.QDeferredDeleteEvent { - if this == nil { - return nil - } - return this.h -} - -func (this *QDeferredDeleteEvent) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQDeferredDeleteEvent(h *C.QDeferredDeleteEvent) *QDeferredDeleteEvent { - if h == nil { - return nil - } - return &QDeferredDeleteEvent{h: h, QEvent: UnsafeNewQEvent(unsafe.Pointer(h))} -} - -func UnsafeNewQDeferredDeleteEvent(h unsafe.Pointer) *QDeferredDeleteEvent { - return newQDeferredDeleteEvent((*C.QDeferredDeleteEvent)(h)) -} - -// NewQDeferredDeleteEvent constructs a new QDeferredDeleteEvent object. -func NewQDeferredDeleteEvent() *QDeferredDeleteEvent { - ret := C.QDeferredDeleteEvent_new() - return newQDeferredDeleteEvent(ret) -} - -func (this *QDeferredDeleteEvent) Clone() *QDeferredDeleteEvent { - return UnsafeNewQDeferredDeleteEvent(unsafe.Pointer(C.QDeferredDeleteEvent_Clone(this.h))) -} - -func (this *QDeferredDeleteEvent) LoopLevel() int { - return (int)(C.QDeferredDeleteEvent_LoopLevel(this.h)) -} - -// Delete this object from C++ memory. -func (this *QDeferredDeleteEvent) Delete() { - C.QDeferredDeleteEvent_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QDeferredDeleteEvent) GoGC() { - runtime.SetFinalizer(this, func(this *QDeferredDeleteEvent) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qcoreevent.h b/qt6/gen_qcoreevent.h index 870dce46..91cba5db 100644 --- a/qt6/gen_qcoreevent.h +++ b/qt6/gen_qcoreevent.h @@ -16,7 +16,6 @@ extern "C" { #ifdef __cplusplus class QByteArray; class QChildEvent; -class QDeferredDeleteEvent; class QDynamicPropertyChangeEvent; class QEvent; class QObject; @@ -24,7 +23,6 @@ class QTimerEvent; #else typedef struct QByteArray QByteArray; typedef struct QChildEvent QChildEvent; -typedef struct QDeferredDeleteEvent QDeferredDeleteEvent; typedef struct QDynamicPropertyChangeEvent QDynamicPropertyChangeEvent; typedef struct QEvent QEvent; typedef struct QObject QObject; @@ -64,11 +62,6 @@ QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_Clone(const QDynamicPro struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self); void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self); -QDeferredDeleteEvent* QDeferredDeleteEvent_new(); -QDeferredDeleteEvent* QDeferredDeleteEvent_Clone(const QDeferredDeleteEvent* self); -int QDeferredDeleteEvent_LoopLevel(const QDeferredDeleteEvent* self); -void QDeferredDeleteEvent_Delete(QDeferredDeleteEvent* self); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qfiledialog.cpp b/qt6/gen_qfiledialog.cpp index 3b4b071b..34ba0e27 100644 --- a/qt6/gen_qfiledialog.cpp +++ b/qt6/gen_qfiledialog.cpp @@ -691,9 +691,10 @@ struct miqt_array* QFileDialog_GetOpenFileUrls() { return _out; } -void QFileDialog_SaveFileContent(struct miqt_string fileContent) { +void QFileDialog_SaveFileContent(struct miqt_string fileContent, struct miqt_string fileNameHint) { QByteArray fileContent_QByteArray(fileContent.data, fileContent.len); - QFileDialog::saveFileContent(fileContent_QByteArray); + QString fileNameHint_QString = QString::fromUtf8(fileNameHint.data, fileNameHint.len); + QFileDialog::saveFileContent(fileContent_QByteArray, fileNameHint_QString); } struct miqt_string QFileDialog_Tr2(const char* s, const char* c) { @@ -1084,12 +1085,6 @@ struct miqt_array* QFileDialog_GetOpenFileUrls4(QWidget* parent, struct miqt_str return _out; } -void QFileDialog_SaveFileContent2(struct miqt_string fileContent, struct miqt_string fileNameHint) { - QByteArray fileContent_QByteArray(fileContent.data, fileContent.len); - QString fileNameHint_QString = QString::fromUtf8(fileNameHint.data, fileNameHint.len); - QFileDialog::saveFileContent(fileContent_QByteArray, fileNameHint_QString); -} - void QFileDialog_Delete(QFileDialog* self) { delete self; } diff --git a/qt6/gen_qfiledialog.go b/qt6/gen_qfiledialog.go index a319cb05..ff774108 100644 --- a/qt6/gen_qfiledialog.go +++ b/qt6/gen_qfiledialog.go @@ -860,11 +860,15 @@ func QFileDialog_GetOpenFileUrls() []QUrl { return _ret } -func QFileDialog_SaveFileContent(fileContent []byte) { +func QFileDialog_SaveFileContent(fileContent []byte, fileNameHint string) { fileContent_alias := C.struct_miqt_string{} fileContent_alias.data = (*C.char)(unsafe.Pointer(&fileContent[0])) fileContent_alias.len = C.size_t(len(fileContent)) - C.QFileDialog_SaveFileContent(fileContent_alias) + fileNameHint_ms := C.struct_miqt_string{} + fileNameHint_ms.data = C.CString(fileNameHint) + fileNameHint_ms.len = C.size_t(len(fileNameHint)) + defer C.free(unsafe.Pointer(fileNameHint_ms.data)) + C.QFileDialog_SaveFileContent(fileContent_alias, fileNameHint_ms) } func QFileDialog_Tr2(s string, c string) string { @@ -1348,17 +1352,6 @@ func QFileDialog_GetOpenFileUrls4(parent *QWidget, caption string, dir *QUrl, fi return _ret } -func QFileDialog_SaveFileContent2(fileContent []byte, fileNameHint string) { - fileContent_alias := C.struct_miqt_string{} - fileContent_alias.data = (*C.char)(unsafe.Pointer(&fileContent[0])) - fileContent_alias.len = C.size_t(len(fileContent)) - fileNameHint_ms := C.struct_miqt_string{} - fileNameHint_ms.data = C.CString(fileNameHint) - fileNameHint_ms.len = C.size_t(len(fileNameHint)) - defer C.free(unsafe.Pointer(fileNameHint_ms.data)) - C.QFileDialog_SaveFileContent2(fileContent_alias, fileNameHint_ms) -} - // Delete this object from C++ memory. func (this *QFileDialog) Delete() { C.QFileDialog_Delete(this.h) diff --git a/qt6/gen_qfiledialog.h b/qt6/gen_qfiledialog.h index 625aeb41..3a14a890 100644 --- a/qt6/gen_qfiledialog.h +++ b/qt6/gen_qfiledialog.h @@ -119,7 +119,7 @@ struct miqt_string QFileDialog_GetExistingDirectory(); QUrl* QFileDialog_GetExistingDirectoryUrl(); struct miqt_array* QFileDialog_GetOpenFileNames(); struct miqt_array* QFileDialog_GetOpenFileUrls(); -void QFileDialog_SaveFileContent(struct miqt_string fileContent); +void QFileDialog_SaveFileContent(struct miqt_string fileContent, struct miqt_string fileNameHint); struct miqt_string QFileDialog_Tr2(const char* s, const char* c); struct miqt_string QFileDialog_Tr3(const char* s, const char* c, int n); void QFileDialog_SetOption2(QFileDialog* self, int option, bool on); @@ -156,7 +156,6 @@ struct miqt_array* QFileDialog_GetOpenFileUrls1(QWidget* parent); struct miqt_array* QFileDialog_GetOpenFileUrls2(QWidget* parent, struct miqt_string caption); struct miqt_array* QFileDialog_GetOpenFileUrls3(QWidget* parent, struct miqt_string caption, QUrl* dir); struct miqt_array* QFileDialog_GetOpenFileUrls4(QWidget* parent, struct miqt_string caption, QUrl* dir, struct miqt_string filter); -void QFileDialog_SaveFileContent2(struct miqt_string fileContent, struct miqt_string fileNameHint); void QFileDialog_Delete(QFileDialog* self); #ifdef __cplusplus diff --git a/qt6/gen_qpropertyprivate.cpp b/qt6/gen_qpropertyprivate.cpp index ef2f6c01..7a5932fc 100644 --- a/qt6/gen_qpropertyprivate.cpp +++ b/qt6/gen_qpropertyprivate.cpp @@ -2,7 +2,6 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QUntypedPropertyData__InheritsQUntypedPropertyData #define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__BindingFunctionVTable #define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__MSVCWorkAround #define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QPropertyBindingData @@ -84,7 +83,3 @@ void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* sel delete self; } -void QUntypedPropertyData__InheritsQUntypedPropertyData_Delete(QUntypedPropertyData__InheritsQUntypedPropertyData* self) { - delete self; -} - diff --git a/qt6/gen_qpropertyprivate.go b/qt6/gen_qpropertyprivate.go index 5772f49a..92aa3adc 100644 --- a/qt6/gen_qpropertyprivate.go +++ b/qt6/gen_qpropertyprivate.go @@ -362,46 +362,3 @@ func (this *QtPrivate__QPropertyBindingData) GoGC() { runtime.KeepAlive(this.h) }) } - -type QUntypedPropertyData__InheritsQUntypedPropertyData struct { - h *C.QUntypedPropertyData__InheritsQUntypedPropertyData -} - -func (this *QUntypedPropertyData__InheritsQUntypedPropertyData) cPointer() *C.QUntypedPropertyData__InheritsQUntypedPropertyData { - if this == nil { - return nil - } - return this.h -} - -func (this *QUntypedPropertyData__InheritsQUntypedPropertyData) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQUntypedPropertyData__InheritsQUntypedPropertyData(h *C.QUntypedPropertyData__InheritsQUntypedPropertyData) *QUntypedPropertyData__InheritsQUntypedPropertyData { - if h == nil { - return nil - } - return &QUntypedPropertyData__InheritsQUntypedPropertyData{h: h} -} - -func UnsafeNewQUntypedPropertyData__InheritsQUntypedPropertyData(h unsafe.Pointer) *QUntypedPropertyData__InheritsQUntypedPropertyData { - return newQUntypedPropertyData__InheritsQUntypedPropertyData((*C.QUntypedPropertyData__InheritsQUntypedPropertyData)(h)) -} - -// Delete this object from C++ memory. -func (this *QUntypedPropertyData__InheritsQUntypedPropertyData) Delete() { - C.QUntypedPropertyData__InheritsQUntypedPropertyData_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QUntypedPropertyData__InheritsQUntypedPropertyData) GoGC() { - runtime.SetFinalizer(this, func(this *QUntypedPropertyData__InheritsQUntypedPropertyData) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qpropertyprivate.h b/qt6/gen_qpropertyprivate.h index ca644e60..68fa0bea 100644 --- a/qt6/gen_qpropertyprivate.h +++ b/qt6/gen_qpropertyprivate.h @@ -18,11 +18,6 @@ class QBindingStorage; class QPropertyProxyBindingData; class QUntypedPropertyBinding; class QUntypedPropertyData; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QUntypedPropertyData__InheritsQUntypedPropertyData) -typedef QUntypedPropertyData::InheritsQUntypedPropertyData QUntypedPropertyData__InheritsQUntypedPropertyData; -#else -class QUntypedPropertyData__InheritsQUntypedPropertyData; -#endif #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__BindingFunctionVTable) typedef QtPrivate::BindingFunctionVTable QtPrivate__BindingFunctionVTable; #else @@ -53,7 +48,6 @@ typedef struct QBindingStorage QBindingStorage; typedef struct QPropertyProxyBindingData QPropertyProxyBindingData; typedef struct QUntypedPropertyBinding QUntypedPropertyBinding; typedef struct QUntypedPropertyData QUntypedPropertyData; -typedef struct QUntypedPropertyData__InheritsQUntypedPropertyData QUntypedPropertyData__InheritsQUntypedPropertyData; typedef struct QtPrivate__BindingFunctionVTable QtPrivate__BindingFunctionVTable; typedef struct QtPrivate__MSVCWorkAround QtPrivate__MSVCWorkAround; typedef struct QtPrivate__QPropertyBindingData QtPrivate__QPropertyBindingData; @@ -86,8 +80,6 @@ void QtPrivate__QPropertyBindingData_NotifyObservers(const QtPrivate__QPropertyB void QtPrivate__QPropertyBindingData_NotifyObservers2(const QtPrivate__QPropertyBindingData* self, QUntypedPropertyData* propertyDataPtr, QBindingStorage* storage); void QtPrivate__QPropertyBindingData_Delete(QtPrivate__QPropertyBindingData* self); -void QUntypedPropertyData__InheritsQUntypedPropertyData_Delete(QUntypedPropertyData__InheritsQUntypedPropertyData* self); - #ifdef __cplusplus } /* extern C */ #endif diff --git a/qt6/gen_qsequentialiterable.cpp b/qt6/gen_qsequentialiterable.cpp new file mode 100644 index 00000000..cd391719 --- /dev/null +++ b/qt6/gen_qsequentialiterable.cpp @@ -0,0 +1,4 @@ +#include +#include "gen_qsequentialiterable.h" +#include "_cgo_export.h" + diff --git a/qt6/gen_qsequentialiterable.go b/qt6/gen_qsequentialiterable.go new file mode 100644 index 00000000..dbd0c1af --- /dev/null +++ b/qt6/gen_qsequentialiterable.go @@ -0,0 +1,17 @@ +package qt6 + +/* + +#include "gen_qsequentialiterable.h" +#include + +*/ +import "C" + +type QSequentialIterable__Position int + +const ( + QSequentialIterable__Unspecified QSequentialIterable__Position = 0 + QSequentialIterable__AtBegin QSequentialIterable__Position = 1 + QSequentialIterable__AtEnd QSequentialIterable__Position = 2 +) diff --git a/qt6/gen_qsequentialiterable.h b/qt6/gen_qsequentialiterable.h new file mode 100644 index 00000000..9d15eeab --- /dev/null +++ b/qt6/gen_qsequentialiterable.h @@ -0,0 +1,24 @@ +#ifndef GEN_QSEQUENTIALITERABLE_H +#define GEN_QSEQUENTIALITERABLE_H + +#include +#include +#include + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + +#include "../libmiqt/libmiqt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +#else +#endif + +#ifdef __cplusplus +} /* extern C */ +#endif + +#endif diff --git a/qt6/gen_qshareddata.cpp b/qt6/gen_qshareddata.cpp index 404549e9..1a6fbc6a 100644 --- a/qt6/gen_qshareddata.cpp +++ b/qt6/gen_qshareddata.cpp @@ -1,4 +1,3 @@ -#include #include #include #include "gen_qshareddata.h" diff --git a/qt6/gen_qtimezone.cpp b/qt6/gen_qtimezone.cpp index 88d2f502..2fce9ca5 100644 --- a/qt6/gen_qtimezone.cpp +++ b/qt6/gen_qtimezone.cpp @@ -58,14 +58,6 @@ void QTimeZone_Swap(QTimeZone* self, QTimeZone* other) { self->swap(*other); } -bool QTimeZone_OperatorEqual(const QTimeZone* self, QTimeZone* other) { - return self->operator==(*other); -} - -bool QTimeZone_OperatorNotEqual(const QTimeZone* self, QTimeZone* other) { - return self->operator!=(*other); -} - bool QTimeZone_IsValid(const QTimeZone* self) { return self->isValid(); } diff --git a/qt6/gen_qtimezone.go b/qt6/gen_qtimezone.go index d79dc353..da916d42 100644 --- a/qt6/gen_qtimezone.go +++ b/qt6/gen_qtimezone.go @@ -156,14 +156,6 @@ func (this *QTimeZone) Swap(other *QTimeZone) { C.QTimeZone_Swap(this.h, other.cPointer()) } -func (this *QTimeZone) OperatorEqual(other *QTimeZone) bool { - return (bool)(C.QTimeZone_OperatorEqual(this.h, other.cPointer())) -} - -func (this *QTimeZone) OperatorNotEqual(other *QTimeZone) bool { - return (bool)(C.QTimeZone_OperatorNotEqual(this.h, other.cPointer())) -} - func (this *QTimeZone) IsValid() bool { return (bool)(C.QTimeZone_IsValid(this.h)) } diff --git a/qt6/gen_qtimezone.h b/qt6/gen_qtimezone.h index 7cedeb09..ea92723b 100644 --- a/qt6/gen_qtimezone.h +++ b/qt6/gen_qtimezone.h @@ -40,8 +40,6 @@ QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct m QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment); void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other); void QTimeZone_Swap(QTimeZone* self, QTimeZone* other); -bool QTimeZone_OperatorEqual(const QTimeZone* self, QTimeZone* other); -bool QTimeZone_OperatorNotEqual(const QTimeZone* self, QTimeZone* other); bool QTimeZone_IsValid(const QTimeZone* self); struct miqt_string QTimeZone_Id(const QTimeZone* self); uint16_t QTimeZone_Territory(const QTimeZone* self); diff --git a/qt6/gen_qvariant.cpp b/qt6/gen_qvariant.cpp index b1e87476..1ccfe3bf 100644 --- a/qt6/gen_qvariant.cpp +++ b/qt6/gen_qvariant.cpp @@ -31,7 +31,6 @@ #include #include #include -#define WORKAROUND_INNER_CLASS_DEFINITION_QVariant__PrivateShared #include #define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QVariantTypeCoercer #include @@ -557,23 +556,3 @@ void QVariantConstPointer_Delete(QVariantConstPointer* self) { delete self; } -QVariant__PrivateShared* QVariant__PrivateShared_new(QVariant__PrivateShared* param1) { - return new QVariant::PrivateShared(*param1); -} - -void QVariant__PrivateShared_Free(QVariant__PrivateShared* p) { - QVariant::PrivateShared::free(p); -} - -const void* QVariant__PrivateShared_Data(const QVariant__PrivateShared* self) { - return (const void*) self->data(); -} - -void* QVariant__PrivateShared_Data2(QVariant__PrivateShared* self) { - return self->data(); -} - -void QVariant__PrivateShared_Delete(QVariant__PrivateShared* self) { - delete self; -} - diff --git a/qt6/gen_qvariant.go b/qt6/gen_qvariant.go index 8fe06d12..d498c60a 100644 --- a/qt6/gen_qvariant.go +++ b/qt6/gen_qvariant.go @@ -872,64 +872,3 @@ func (this *QVariantConstPointer) GoGC() { runtime.KeepAlive(this.h) }) } - -type QVariant__PrivateShared struct { - h *C.QVariant__PrivateShared -} - -func (this *QVariant__PrivateShared) cPointer() *C.QVariant__PrivateShared { - if this == nil { - return nil - } - return this.h -} - -func (this *QVariant__PrivateShared) UnsafePointer() unsafe.Pointer { - if this == nil { - return nil - } - return unsafe.Pointer(this.h) -} - -func newQVariant__PrivateShared(h *C.QVariant__PrivateShared) *QVariant__PrivateShared { - if h == nil { - return nil - } - return &QVariant__PrivateShared{h: h} -} - -func UnsafeNewQVariant__PrivateShared(h unsafe.Pointer) *QVariant__PrivateShared { - return newQVariant__PrivateShared((*C.QVariant__PrivateShared)(h)) -} - -// NewQVariant__PrivateShared constructs a new QVariant::PrivateShared object. -func NewQVariant__PrivateShared(param1 *QVariant__PrivateShared) *QVariant__PrivateShared { - ret := C.QVariant__PrivateShared_new(param1.cPointer()) - return newQVariant__PrivateShared(ret) -} - -func QVariant__PrivateShared_Free(p *QVariant__PrivateShared) { - C.QVariant__PrivateShared_Free(p.cPointer()) -} - -func (this *QVariant__PrivateShared) Data() unsafe.Pointer { - return (unsafe.Pointer)(C.QVariant__PrivateShared_Data(this.h)) -} - -func (this *QVariant__PrivateShared) Data2() unsafe.Pointer { - return (unsafe.Pointer)(C.QVariant__PrivateShared_Data2(this.h)) -} - -// Delete this object from C++ memory. -func (this *QVariant__PrivateShared) Delete() { - C.QVariant__PrivateShared_Delete(this.h) -} - -// GoGC adds a Go Finalizer to this pointer, so that it will be deleted -// from C++ memory once it is unreachable from Go memory. -func (this *QVariant__PrivateShared) GoGC() { - runtime.SetFinalizer(this, func(this *QVariant__PrivateShared) { - this.Delete() - runtime.KeepAlive(this.h) - }) -} diff --git a/qt6/gen_qvariant.h b/qt6/gen_qvariant.h index bc639a78..0adfcf23 100644 --- a/qt6/gen_qvariant.h +++ b/qt6/gen_qvariant.h @@ -43,11 +43,6 @@ class QTime; class QUrl; class QUuid; class QVariant; -#if defined(WORKAROUND_INNER_CLASS_DEFINITION_QVariant__PrivateShared) -typedef QVariant::PrivateShared QVariant__PrivateShared; -#else -class QVariant__PrivateShared; -#endif class QVariantConstPointer; #if defined(WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__QVariantTypeCoercer) typedef QtPrivate::QVariantTypeCoercer QtPrivate__QVariantTypeCoercer; @@ -84,7 +79,6 @@ typedef struct QTime QTime; typedef struct QUrl QUrl; typedef struct QUuid QUuid; typedef struct QVariant QVariant; -typedef struct QVariant__PrivateShared QVariant__PrivateShared; typedef struct QVariantConstPointer QVariantConstPointer; typedef struct QtPrivate__QVariantTypeCoercer QtPrivate__QVariantTypeCoercer; #endif @@ -210,12 +204,6 @@ QVariant* QVariantConstPointer_OperatorMinusGreater(const QVariantConstPointer* void QVariantConstPointer_OperatorAssign(QVariantConstPointer* self, QVariantConstPointer* param1); void QVariantConstPointer_Delete(QVariantConstPointer* self); -QVariant__PrivateShared* QVariant__PrivateShared_new(QVariant__PrivateShared* param1); -void QVariant__PrivateShared_Free(QVariant__PrivateShared* p); -const void* QVariant__PrivateShared_Data(const QVariant__PrivateShared* self); -void* QVariant__PrivateShared_Data2(QVariant__PrivateShared* self); -void QVariant__PrivateShared_Delete(QVariant__PrivateShared* self); - #ifdef __cplusplus } /* extern C */ #endif