Merge pull request #39 from mappu/genbindings-qt6-support

Genbindings: Support C++17 idioms used by Qt 6
This commit is contained in:
mappu 2024-10-11 19:01:46 +13:00 committed by GitHub
commit 204f886760
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
46 changed files with 614 additions and 456 deletions

View File

@ -129,7 +129,7 @@ $env:CGO_CXXFLAGS = '-Wno-ignored-attributes -D_Bool=bool' # Clang 18 recommenda
### Windows (MSYS2)
*Tested with MSYS2 UCRT64*
*Tested with MSYS2 UCRT64 Qt 5.15 / GCC 14*
For dynamic builds:

View File

@ -18,6 +18,7 @@ func parseHeader(topLevel []interface{}, addNamePrefix string) (*CppParsedHeader
var ret CppParsedHeader
nextTopLevel:
for _, node := range topLevel {
node, ok := node.(map[string]interface{})
@ -55,8 +56,10 @@ func parseHeader(topLevel []interface{}, addNamePrefix string) (*CppParsedHeader
"ClassTemplateSpecializationDecl",
"ClassTemplatePartialSpecializationDecl",
"FunctionTemplateDecl",
"TypeAliasTemplateDecl", // e.g. qendian.h
"VarTemplateDecl": // e.g. qglobal.h
"VarTemplatePartialSpecializationDecl", // e.g. Qt6 qcontainerinfo.h
"VarTemplateSpecializationDecl", // e.g. qhashfunctions.h
"TypeAliasTemplateDecl", // e.g. qendian.h
"VarTemplateDecl": // e.g. qglobal.h
// Template stuff probably can't be supported in the binding since
// we would need to link a concrete instantiation for each type in
// the CABI
@ -71,7 +74,10 @@ func parseHeader(topLevel []interface{}, addNamePrefix string) (*CppParsedHeader
// Then copy the parsed elements back into our own file
namespace, ok := node["name"].(string)
if !ok {
panic("NamespaceDecl missing name")
// Qt 5 has none of these
// Qt 6 has some e.g. qloggingcategory.h
// Treat it as not having existed
continue nextTopLevel
}
namespaceInner, ok := node["inner"].([]interface{})
@ -124,14 +130,13 @@ func parseHeader(topLevel []interface{}, addNamePrefix string) (*CppParsedHeader
// TODO e.g. qfuturewatcher.h
// Probably can't be supported in the Go binding
case "TypeAliasDecl", // qglobal.h
"UsingDirectiveDecl", // qtextstream.h
"UsingDecl", // qglobal.h
"UsingShadowDecl": // global.h
case "UsingDirectiveDecl", // qtextstream.h
"UsingDecl", // qglobal.h
"UsingShadowDecl": // global.h
// TODO e.g.
// Should be treated like a typedef
case "TypedefDecl":
case "TypeAliasDecl", "TypedefDecl":
td, err := processTypedef(node, addNamePrefix)
if err != nil {
return nil, fmt.Errorf("processTypedef: %w", err)
@ -323,7 +328,7 @@ nextMethod:
ret.ChildClassdefs = append(ret.ChildClassdefs, child)
case "TypedefDecl":
case "TypeAliasDecl", "TypedefDecl":
// Child class typedef
td, err := processTypedef(node, nodename+"::")
if err != nil {
@ -512,6 +517,7 @@ func processEnum(node map[string]interface{}, addNamePrefix string) (CppEnum, er
var lastImplicitValue int64 = -1
nextEnumEntry:
for _, entry := range inner {
entry, ok := entry.(map[string]interface{})
if !ok {
@ -519,7 +525,12 @@ func processEnum(node map[string]interface{}, addNamePrefix string) (CppEnum, er
}
kind, ok := entry["kind"].(string)
if !ok || kind != "EnumConstantDecl" {
if kind == "DeprecatedAttr" {
continue nextEnumEntry // skip
} else if kind == "EnumConstantDecl" {
// allow
} else {
// unknown kind, or maybe !ok
return ret, fmt.Errorf("unexpected kind %q", kind)
}
@ -539,35 +550,49 @@ func processEnum(node map[string]interface{}, addNamePrefix string) (CppEnum, er
// This means one more than the last value
cee.EntryValue = fmt.Sprintf("%d", lastImplicitValue+1)
} else if len(ei1) == 1 {
} else if len(ei1) >= 1 {
ei1_0 := ei1[0].(map[string]interface{})
// There may be more than one RHS `inner` expression if one of them
// is a comment
// Iterate through each of the ei1 entries and see if any of them
// work for the purposes of enum constant value parsing
for _, ei1_0 := range ei1 {
// Best case: .inner -> kind=ConstantExpr value=xx
// e.g. qabstractitemmodel
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "ConstantExpr" {
log.Printf("Got ConstantExpr OK")
if ei1Value, ok := ei1_0["value"].(string); ok {
cee.EntryValue = ei1Value
goto afterParse
ei1_0 := ei1_0.(map[string]interface{})
// Best case: .inner -> kind=ConstantExpr value=xx
// e.g. qabstractitemmodel
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "ConstantExpr" {
log.Printf("Got ConstantExpr OK")
if ei1Value, ok := ei1_0["value"].(string); ok {
cee.EntryValue = ei1Value
goto afterParse
}
}
}
// Best case: .inner -> kind=ImplicitCastExpr .inner -> kind=ConstantExpr value=xx
// e.g. QCalendar (when there is a int typecast)
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "ImplicitCastExpr" {
log.Printf("Got ImplicitCastExpr OK")
if ei2, ok := ei1_0["inner"].([]interface{}); ok && len(ei2) > 0 {
ei2_0 := ei2[0].(map[string]interface{})
if ei2Kind, ok := ei2_0["kind"].(string); ok && ei2Kind == "ConstantExpr" {
log.Printf("Got ConstantExpr OK")
if ei2Value, ok := ei2_0["value"].(string); ok {
cee.EntryValue = ei2Value
goto afterParse
// Best case: .inner -> kind=ImplicitCastExpr .inner -> kind=ConstantExpr value=xx
// e.g. QCalendar (when there is a int typecast)
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "ImplicitCastExpr" {
log.Printf("Got ImplicitCastExpr OK")
if ei2, ok := ei1_0["inner"].([]interface{}); ok && len(ei2) > 0 {
ei2_0 := ei2[0].(map[string]interface{})
if ei2Kind, ok := ei2_0["kind"].(string); ok && ei2Kind == "ConstantExpr" {
log.Printf("Got ConstantExpr OK")
if ei2Value, ok := ei2_0["value"].(string); ok {
cee.EntryValue = ei2Value
goto afterParse
}
}
}
}
if ei1Kind, ok := ei1_0["kind"].(string); ok && ei1Kind == "DeprecatedAttr" {
log.Printf("Enum entry %q is deprecated, skipping", ret.EnumName+"::"+entryname)
continue nextEnumEntry
}
}
// If we made it here, we did not hit any of the `goto afterParse` cases
}
afterParse:

View File

@ -6,8 +6,16 @@ import (
"errors"
"fmt"
"io"
"log"
"os"
"os/exec"
"sync"
"time"
)
const (
ClangMaxRetries = 5
ClangRetryDelay = 3 * time.Second
)
func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []string) ([]interface{}, error) {
@ -22,6 +30,8 @@ func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []strin
return nil, fmt.Errorf("StdoutPipe: %w", err)
}
cmd.Stderr = os.Stderr
err = cmd.Start()
if err != nil {
return nil, fmt.Errorf("Start: %w", err)
@ -52,6 +62,26 @@ func clangExec(ctx context.Context, clangBin, inputHeader string, cflags []strin
return inner, nil
}
func mustClangExec(ctx context.Context, clangBin, inputHeader string, cflags []string) []interface{} {
for i := 0; i < ClangMaxRetries; i++ {
astInner, err := clangExec(ctx, clangBin, inputHeader, cflags)
if err != nil {
// Log and continue with next retry
log.Printf("WARNING: Clang execution failed: %v", err)
time.Sleep(ClangRetryDelay)
log.Printf("Retrying...")
}
// Success
return astInner
}
// Failed 5x
// Panic
panic("Clang failed 5x parsing file " + inputHeader)
}
// clangStripUpToFile strips all AST nodes from the clang output until we find
// one that really originated in the source file.
// This cleans out everything in the translation unit that came from an

View File

@ -51,15 +51,13 @@ func (p CppParameter) RenderTypeCabi() string {
ret = "uint64_t"
case "qfloat16":
ret = "_Float16" // No idea where this typedef comes from, but it exists
case "qsizetype":
ret = "size_t"
case "qreal":
ret = "double"
case "qintptr", "QIntegerForSizeof<void *>::Signed":
ret = "intptr_t"
case "quintptr", "uintptr", "QIntegerForSizeof<void *>::Unsigned":
ret = "uintptr_t"
case "qptrdiff":
case "qsizetype", "qptrdiff", "QIntegerForSizeof<std::size_t>::Signed":
ret = "ptrdiff_t"
}
@ -236,6 +234,8 @@ func emitCABI2CppForwarding(p CppParameter, indent string) (preamble string, for
p.ParameterType == "quint64" ||
p.ParameterType == "qlonglong" ||
p.ParameterType == "qulonglong" ||
p.GetQtCppType().ParameterType == "qintptr" ||
p.GetQtCppType().ParameterType == "qsizetype" || // Qt 6 qversionnumber.h: invalid static_cast from type ptrdiff_t* {aka long int*} to type qsizetype* {aka long long int*}
p.ParameterType == "qint8" {
// QDataStream::operator>>() by reference (qint64)
// QLockFile::getLockInfo() by pointer
@ -688,7 +688,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
// If there are hidden parameters, the type of the signal itself
// needs to include them
exactSignal := `static_cast<void (` + c.ClassName + `::*)(` + emitParameterTypesCpp(m, true) + `)>(&` + c.ClassName + `::` + m.CppCallTarget() + `)`
exactSignal := `static_cast<void (` + c.ClassName + `::*)(` + emitParameterTypesCpp(m, true) + `)` + ifv(m.IsConst, ` const`, ``) + `>(&` + c.ClassName + `::` + m.CppCallTarget() + `)`
paramArgs := []string{"slot"}
paramArgDefs := []string{"void* cb"}

View File

@ -45,11 +45,14 @@ func (p CppParameter) RenderTypeGo() string {
}
switch p.ParameterType {
case "char", "qint8", "signed char", "unsigned char", "uchar", "quint8":
ret += "byte" // Strictly speaking, Go byte is unsigned and char may be signed
case "short", "qint16":
case "unsigned char", "uchar", "quint8":
// Go byte is unsigned
ret += "byte"
case "char", "qint8", "signed char":
ret += "int8" // Signed
case "short", "qint16", "int16_t":
ret += "int16"
case "ushort", "quint16", "unsigned short":
case "ushort", "quint16", "unsigned short", "uint16_t":
ret += "uint16"
case "long":
// Windows ILP32 - 32-bits
@ -80,12 +83,19 @@ func (p CppParameter) RenderTypeGo() string {
ret += "float32"
case "double", "qreal":
ret += "float64"
case "qsizetype", "size_t", "qptrdiff", "ptrdiff_t":
case "size_t": // size_t is unsigned
if C.sizeof_size_t == 4 {
ret += "uint32"
} else {
ret += "uint64"
}
case "qsizetype", "QIntegerForSizeof<std::size_t>::Signed", "qptrdiff", "ptrdiff_t": // all signed
if C.sizeof_size_t == 4 {
ret += "int32"
} else {
ret += "int64"
}
case "qintptr", "uintptr_t", "intptr_t", "quintptr", "QIntegerForSizeof<void *>::Unsigned", "QIntegerForSizeof<void *>::Signed":
ret += "uintptr"
default:
@ -471,7 +481,7 @@ import "C"
// Embed all inherited types to directly allow calling inherited methods
for _, base := range c.Inherits {
ret.WriteString("*" + base + "\n")
ret.WriteString("*" + cabiClassName(base) + "\n")
}
ret.WriteString(`
@ -489,7 +499,7 @@ import "C"
localInit := "h: h"
for _, base := range c.Inherits {
gfs.imports["unsafe"] = struct{}{}
localInit += ", " + base + ": new" + cabiClassName(base) + "_U(unsafe.Pointer(h))"
localInit += ", " + cabiClassName(base) + ": new" + cabiClassName(base) + "_U(unsafe.Pointer(h))"
}
ret.WriteString(`

View File

@ -151,15 +151,16 @@ func (p CppParameter) IntType() bool {
switch p.ParameterType {
case "int", "unsigned int", "uint",
"short", "unsigned short", "ushort", "qint16", "quint16",
"short", "unsigned short", "ushort", "qint16", "quint16", "uint16_t", "int16_t",
"qint8", "quint8",
"unsigned char", "signed char", "uchar",
"long", "unsigned long", "ulong", "qint32", "quint32",
"long", "unsigned long", "ulong", "qint32", "quint32", "int32_t", "uint32_t",
"longlong", "ulonglong", "qlonglong", "qulonglong", "qint64", "quint64", "int64_t", "uint64_t", "long long", "unsigned long long",
"qintptr", "quintptr", "uintptr_t", "intptr_t",
"qsizetype", "size_t",
"QIntegerForSizeof<void *>::Unsigned",
"QIntegerForSizeof<void *>::Signed",
"QIntegerForSizeof<std::size_t>::Signed",
"qptrdiff", "ptrdiff_t",
"double", "float", "qreal":
return true
@ -337,6 +338,7 @@ type CppParsedHeader struct {
func (c CppParsedHeader) Empty() bool {
return len(c.Typedefs) == 0 &&
len(c.Enums) == 0 &&
len(c.Classes) == 0
}

View File

@ -8,8 +8,13 @@ import (
"log"
"os"
"path/filepath"
"runtime"
"strings"
"time"
"sync"
)
const (
ClangSubprocessCount = 3
)
func cacheFilePath(inputHeader string) string {
@ -90,56 +95,88 @@ func main() {
InsertTypedefs()
//
// PASS 0 (Fill clang cache)
//
var clangChan = make(chan string, 0)
var clangWg sync.WaitGroup
for i := 0; i < ClangSubprocessCount; i++ {
clangWg.Add(1)
go func() {
defer clangWg.Done()
log.Printf("Clang worker: starting")
for {
inputHeader, ok := <-clangChan
if !ok {
return // Done
}
log.Printf("Clang worker got message for file %q", inputHeader)
// Parse the file
// This seems to intermittently fail, so allow retrying
astInner := mustClangExec(ctx, *clang, inputHeader, strings.Fields(*cflags))
// Write to cache
jb, err := json.MarshalIndent(astInner, "", "\t")
if err != nil {
panic(err)
}
err = ioutil.WriteFile(cacheFilePath(inputHeader), jb, 0644)
if err != nil {
panic(err)
}
astInner = nil
jb = nil
runtime.GC()
}
log.Printf("Clang worker: exiting")
}()
}
for _, inputHeader := range includeFiles {
// If we have a cached clang AST, use that instead
// Check if there is a matching cache hit
cacheFile := cacheFilePath(inputHeader)
astJson, err := ioutil.ReadFile(cacheFile)
var astInner []interface{} = nil
if err != nil {
if _, err := os.Stat(cacheFile); err != nil && os.IsNotExist(err) {
// Nonexistent cache file, regenerate from clang
log.Printf("No AST cache for file %q, running clang...", filepath.Base(inputHeader))
clangChan <- inputHeader
}
}
// Parse the file
// This seems to intermittently fail, so allow retrying
nextRetry:
for retryCt := 0; retryCt < 5; retryCt++ {
astInner, err = clangExec(ctx, *clang, inputHeader, strings.Fields(*cflags))
if err != nil {
// Log and continue with next retry
log.Printf("WARNING: Clang execution failed: %v", err)
time.Sleep(3 * time.Second)
log.Printf("Retrying...")
// Done with all clang workers
close(clangChan)
clangWg.Wait()
} else { // err == nil
break nextRetry
}
}
if err != nil {
panic("Clang execution failed after 5x retries")
}
// The cache should now be fully populated.
// Write to cache
jb, err := json.MarshalIndent(astInner, "", "\t")
if err != nil {
panic(err)
}
//
// PASS 1 (clang2il)
//
err = ioutil.WriteFile(cacheFile, jb, 0644)
if err != nil {
panic(err)
}
for _, inputHeader := range includeFiles {
} else {
log.Printf("Reused cache AST for file %q", filepath.Base(inputHeader))
cacheFile := cacheFilePath(inputHeader)
// Json decode
err = json.Unmarshal(astJson, &astInner)
if err != nil {
panic(err)
}
astJson, err := ioutil.ReadFile(cacheFile)
if err != nil {
panic("Expected cache to be created for " + inputHeader + ", but got error " + err.Error())
}
// Json decode
var astInner []interface{} = nil
err = json.Unmarshal(astJson, &astInner)
if err != nil {
panic(err)
}
// Convert it to our intermediate format

View File

@ -144,8 +144,8 @@ const char* QBitArray_Bits(const QBitArray* self) {
return (const char*) self->bits();
}
QBitArray* QBitArray_FromBits(const char* data, size_t lenVal) {
return new QBitArray(QBitArray::fromBits(data, static_cast<qsizetype>(lenVal)));
QBitArray* QBitArray_FromBits(const char* data, ptrdiff_t lenVal) {
return new QBitArray(QBitArray::fromBits(data, (qsizetype)(lenVal)));
}
bool QBitArray_Fill22(QBitArray* self, bool val, int size) {

View File

@ -193,10 +193,10 @@ func (this *QBitArray) Bits() unsafe.Pointer {
return (unsafe.Pointer)(_ret)
}
func QBitArray_FromBits(data string, lenVal uint64) *QBitArray {
func QBitArray_FromBits(data string, lenVal int64) *QBitArray {
data_Cstring := C.CString(data)
defer C.free(unsafe.Pointer(data_Cstring))
_ret := C.QBitArray_FromBits(data_Cstring, (C.size_t)(lenVal))
_ret := C.QBitArray_FromBits(data_Cstring, (C.ptrdiff_t)(lenVal))
_goptr := newQBitArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr

View File

@ -56,7 +56,7 @@ bool QBitArray_Fill(QBitArray* self, bool val);
void QBitArray_Fill2(QBitArray* self, bool val, int first, int last);
void QBitArray_Truncate(QBitArray* self, int pos);
const char* QBitArray_Bits(const QBitArray* self);
QBitArray* QBitArray_FromBits(const char* data, size_t lenVal);
QBitArray* QBitArray_FromBits(const char* data, ptrdiff_t lenVal);
bool QBitArray_Fill22(QBitArray* self, bool val, int size);
void QBitArray_Delete(QBitArray* self);

View File

@ -132,7 +132,7 @@ func NewQByteArray2(param1 string) *QByteArray {
}
// NewQByteArray3 constructs a new QByteArray object.
func NewQByteArray3(size int, c byte) *QByteArray {
func NewQByteArray3(size int, c int8) *QByteArray {
ret := C.QByteArray_new3((C.int)(size), (C.char)(c))
return newQByteArray(ret)
}
@ -189,7 +189,7 @@ func (this *QByteArray) Resize(size int) {
C.QByteArray_Resize(this.h, (C.int)(size))
}
func (this *QByteArray) Fill(c byte) *QByteArray {
func (this *QByteArray) Fill(c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Fill(this.h, (C.char)(c))))
}
@ -236,16 +236,16 @@ func (this *QByteArray) Clear() {
C.QByteArray_Clear(this.h)
}
func (this *QByteArray) At(i int) byte {
return (byte)(C.QByteArray_At(this.h, (C.int)(i)))
func (this *QByteArray) At(i int) int8 {
return (int8)(C.QByteArray_At(this.h, (C.int)(i)))
}
func (this *QByteArray) OperatorSubscript(i int) byte {
return (byte)(C.QByteArray_OperatorSubscript(this.h, (C.int)(i)))
func (this *QByteArray) OperatorSubscript(i int) int8 {
return (int8)(C.QByteArray_OperatorSubscript(this.h, (C.int)(i)))
}
func (this *QByteArray) OperatorSubscriptWithUint(i uint) byte {
return (byte)(C.QByteArray_OperatorSubscriptWithUint(this.h, (C.uint)(i)))
func (this *QByteArray) OperatorSubscriptWithUint(i uint) int8 {
return (int8)(C.QByteArray_OperatorSubscriptWithUint(this.h, (C.uint)(i)))
}
func (this *QByteArray) OperatorSubscriptWithInt(i int) *QByteRef {
@ -262,8 +262,8 @@ func (this *QByteArray) OperatorSubscript2(i uint) *QByteRef {
return _goptr
}
func (this *QByteArray) Front() byte {
return (byte)(C.QByteArray_Front(this.h))
func (this *QByteArray) Front() int8 {
return (int8)(C.QByteArray_Front(this.h))
}
func (this *QByteArray) Front2() *QByteRef {
@ -273,8 +273,8 @@ func (this *QByteArray) Front2() *QByteRef {
return _goptr
}
func (this *QByteArray) Back() byte {
return (byte)(C.QByteArray_Back(this.h))
func (this *QByteArray) Back() int8 {
return (int8)(C.QByteArray_Back(this.h))
}
func (this *QByteArray) Back2() *QByteRef {
@ -284,7 +284,7 @@ func (this *QByteArray) Back2() *QByteRef {
return _goptr
}
func (this *QByteArray) IndexOf(c byte) int {
func (this *QByteArray) IndexOf(c int8) int {
return (int)(C.QByteArray_IndexOf(this.h, (C.char)(c)))
}
@ -298,7 +298,7 @@ func (this *QByteArray) IndexOfWithQByteArray(a *QByteArray) int {
return (int)(C.QByteArray_IndexOfWithQByteArray(this.h, a.cPointer()))
}
func (this *QByteArray) LastIndexOf(c byte) int {
func (this *QByteArray) LastIndexOf(c int8) int {
return (int)(C.QByteArray_LastIndexOf(this.h, (C.char)(c)))
}
@ -312,7 +312,7 @@ func (this *QByteArray) LastIndexOfWithQByteArray(a *QByteArray) int {
return (int)(C.QByteArray_LastIndexOfWithQByteArray(this.h, a.cPointer()))
}
func (this *QByteArray) Contains(c byte) bool {
func (this *QByteArray) Contains(c int8) bool {
return (bool)(C.QByteArray_Contains(this.h, (C.char)(c)))
}
@ -326,7 +326,7 @@ func (this *QByteArray) ContainsWithQByteArray(a *QByteArray) bool {
return (bool)(C.QByteArray_ContainsWithQByteArray(this.h, a.cPointer()))
}
func (this *QByteArray) Count(c byte) int {
func (this *QByteArray) Count(c int8) int {
return (int)(C.QByteArray_Count(this.h, (C.char)(c)))
}
@ -382,7 +382,7 @@ func (this *QByteArray) StartsWith(a *QByteArray) bool {
return (bool)(C.QByteArray_StartsWith(this.h, a.cPointer()))
}
func (this *QByteArray) StartsWithWithChar(c byte) bool {
func (this *QByteArray) StartsWithWithChar(c int8) bool {
return (bool)(C.QByteArray_StartsWithWithChar(this.h, (C.char)(c)))
}
@ -396,7 +396,7 @@ func (this *QByteArray) EndsWith(a *QByteArray) bool {
return (bool)(C.QByteArray_EndsWith(this.h, a.cPointer()))
}
func (this *QByteArray) EndsWithWithChar(c byte) bool {
func (this *QByteArray) EndsWithWithChar(c int8) bool {
return (bool)(C.QByteArray_EndsWithWithChar(this.h, (C.char)(c)))
}
@ -464,11 +464,11 @@ func (this *QByteArray) RightJustified(width int) *QByteArray {
return _goptr
}
func (this *QByteArray) Prepend(c byte) *QByteArray {
func (this *QByteArray) Prepend(c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Prepend(this.h, (C.char)(c))))
}
func (this *QByteArray) Prepend2(count int, c byte) *QByteArray {
func (this *QByteArray) Prepend2(count int, c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Prepend2(this.h, (C.int)(count), (C.char)(c))))
}
@ -488,11 +488,11 @@ func (this *QByteArray) PrependWithQByteArray(a *QByteArray) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_PrependWithQByteArray(this.h, a.cPointer())))
}
func (this *QByteArray) Append(c byte) *QByteArray {
func (this *QByteArray) Append(c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Append(this.h, (C.char)(c))))
}
func (this *QByteArray) Append2(count int, c byte) *QByteArray {
func (this *QByteArray) Append2(count int, c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Append2(this.h, (C.int)(count), (C.char)(c))))
}
@ -512,11 +512,11 @@ func (this *QByteArray) AppendWithQByteArray(a *QByteArray) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_AppendWithQByteArray(this.h, a.cPointer())))
}
func (this *QByteArray) Insert(i int, c byte) *QByteArray {
func (this *QByteArray) Insert(i int, c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Insert(this.h, (C.int)(i), (C.char)(c))))
}
func (this *QByteArray) Insert2(i int, count int, c byte) *QByteArray {
func (this *QByteArray) Insert2(i int, count int, c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Insert2(this.h, (C.int)(i), (C.int)(count), (C.char)(c))))
}
@ -556,13 +556,13 @@ func (this *QByteArray) Replace3(index int, lenVal int, s *QByteArray) *QByteArr
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Replace3(this.h, (C.int)(index), (C.int)(lenVal), s.cPointer())))
}
func (this *QByteArray) Replace4(before byte, after string) *QByteArray {
func (this *QByteArray) Replace4(before int8, after string) *QByteArray {
after_Cstring := C.CString(after)
defer C.free(unsafe.Pointer(after_Cstring))
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Replace4(this.h, (C.char)(before), after_Cstring)))
}
func (this *QByteArray) Replace5(before byte, after *QByteArray) *QByteArray {
func (this *QByteArray) Replace5(before int8, after *QByteArray) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Replace5(this.h, (C.char)(before), after.cPointer())))
}
@ -598,11 +598,11 @@ func (this *QByteArray) Replace10(before string, after *QByteArray) *QByteArray
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Replace10(this.h, before_Cstring, after.cPointer())))
}
func (this *QByteArray) Replace11(before byte, after byte) *QByteArray {
func (this *QByteArray) Replace11(before int8, after int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Replace11(this.h, (C.char)(before), (C.char)(after))))
}
func (this *QByteArray) OperatorPlusAssign(c byte) *QByteArray {
func (this *QByteArray) OperatorPlusAssign(c int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_OperatorPlusAssign(this.h, (C.char)(c))))
}
@ -616,7 +616,7 @@ func (this *QByteArray) OperatorPlusAssignWithQByteArray(a *QByteArray) *QByteAr
return newQByteArray_U(unsafe.Pointer(C.QByteArray_OperatorPlusAssignWithQByteArray(this.h, a.cPointer())))
}
func (this *QByteArray) Split(sep byte) []QByteArray {
func (this *QByteArray) Split(sep int8) []QByteArray {
var _ma *C.struct_miqt_array = C.QByteArray_Split(this.h, (C.char)(sep))
_ret := make([]QByteArray, int(_ma.len))
_outCast := (*[0xffff]*C.QByteArray)(unsafe.Pointer(_ma.data)) // hey ya
@ -657,7 +657,7 @@ func (this *QByteArray) Replace12(before string, after string) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Replace12(this.h, (*C.struct_miqt_string)(before_ms), after_Cstring)))
}
func (this *QByteArray) Replace13(c byte, after string) *QByteArray {
func (this *QByteArray) Replace13(c int8, after string) *QByteArray {
after_ms := miqt_strdupg(after)
defer C.free(after_ms)
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Replace13(this.h, (C.char)(c), (*C.struct_miqt_string)(after_ms))))
@ -784,7 +784,7 @@ func (this *QByteArray) ToHex() *QByteArray {
return _goptr
}
func (this *QByteArray) ToHexWithSeparator(separator byte) *QByteArray {
func (this *QByteArray) ToHexWithSeparator(separator int8) *QByteArray {
_ret := C.QByteArray_ToHexWithSeparator(this.h, (C.char)(separator))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
@ -955,7 +955,7 @@ func (this *QByteArray) ConstEnd() unsafe.Pointer {
return (unsafe.Pointer)(_ret)
}
func (this *QByteArray) PushBack(c byte) {
func (this *QByteArray) PushBack(c int8) {
C.QByteArray_PushBack(this.h, (C.char)(c))
}
@ -969,7 +969,7 @@ func (this *QByteArray) PushBackWithQByteArray(a *QByteArray) {
C.QByteArray_PushBackWithQByteArray(this.h, a.cPointer())
}
func (this *QByteArray) PushFront(c byte) {
func (this *QByteArray) PushFront(c int8) {
C.QByteArray_PushFront(this.h, (C.char)(c))
}
@ -999,11 +999,11 @@ func (this *QByteArray) IsNull() bool {
return (bool)(C.QByteArray_IsNull(this.h))
}
func (this *QByteArray) Fill2(c byte, size int) *QByteArray {
func (this *QByteArray) Fill2(c int8, size int) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_Fill2(this.h, (C.char)(c), (C.int)(size))))
}
func (this *QByteArray) IndexOf2(c byte, from int) int {
func (this *QByteArray) IndexOf2(c int8, from int) int {
return (int)(C.QByteArray_IndexOf2(this.h, (C.char)(c), (C.int)(from)))
}
@ -1017,7 +1017,7 @@ func (this *QByteArray) IndexOf23(a *QByteArray, from int) int {
return (int)(C.QByteArray_IndexOf23(this.h, a.cPointer(), (C.int)(from)))
}
func (this *QByteArray) LastIndexOf2(c byte, from int) int {
func (this *QByteArray) LastIndexOf2(c int8, from int) int {
return (int)(C.QByteArray_LastIndexOf2(this.h, (C.char)(c), (C.int)(from)))
}
@ -1048,28 +1048,28 @@ func (this *QByteArray) Mid2(index int, lenVal int) *QByteArray {
return _goptr
}
func (this *QByteArray) LeftJustified2(width int, fill byte) *QByteArray {
func (this *QByteArray) LeftJustified2(width int, fill int8) *QByteArray {
_ret := C.QByteArray_LeftJustified2(this.h, (C.int)(width), (C.char)(fill))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QByteArray) LeftJustified3(width int, fill byte, truncate bool) *QByteArray {
func (this *QByteArray) LeftJustified3(width int, fill int8, truncate bool) *QByteArray {
_ret := C.QByteArray_LeftJustified3(this.h, (C.int)(width), (C.char)(fill), (C.bool)(truncate))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QByteArray) RightJustified2(width int, fill byte) *QByteArray {
func (this *QByteArray) RightJustified2(width int, fill int8) *QByteArray {
_ret := C.QByteArray_RightJustified2(this.h, (C.int)(width), (C.char)(fill))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QByteArray) RightJustified3(width int, fill byte, truncate bool) *QByteArray {
func (this *QByteArray) RightJustified3(width int, fill int8, truncate bool) *QByteArray {
_ret := C.QByteArray_RightJustified3(this.h, (C.int)(width), (C.char)(fill), (C.bool)(truncate))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
@ -1174,7 +1174,7 @@ func (this *QByteArray) ToPercentEncoding2(exclude *QByteArray, include *QByteAr
return _goptr
}
func (this *QByteArray) ToPercentEncoding3(exclude *QByteArray, include *QByteArray, percent byte) *QByteArray {
func (this *QByteArray) ToPercentEncoding3(exclude *QByteArray, include *QByteArray, percent int8) *QByteArray {
_ret := C.QByteArray_ToPercentEncoding3(this.h, exclude.cPointer(), include.cPointer(), (C.char)(percent))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
@ -1205,19 +1205,19 @@ func (this *QByteArray) SetNum26(param1 uint64, base int) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_SetNum26(this.h, (C.ulonglong)(param1), (C.int)(base))))
}
func (this *QByteArray) SetNum27(param1 float32, f byte) *QByteArray {
func (this *QByteArray) SetNum27(param1 float32, f int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_SetNum27(this.h, (C.float)(param1), (C.char)(f))))
}
func (this *QByteArray) SetNum3(param1 float32, f byte, prec int) *QByteArray {
func (this *QByteArray) SetNum3(param1 float32, f int8, prec int) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_SetNum3(this.h, (C.float)(param1), (C.char)(f), (C.int)(prec))))
}
func (this *QByteArray) SetNum28(param1 float64, f byte) *QByteArray {
func (this *QByteArray) SetNum28(param1 float64, f int8) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_SetNum28(this.h, (C.double)(param1), (C.char)(f))))
}
func (this *QByteArray) SetNum32(param1 float64, f byte, prec int) *QByteArray {
func (this *QByteArray) SetNum32(param1 float64, f int8, prec int) *QByteArray {
return newQByteArray_U(unsafe.Pointer(C.QByteArray_SetNum32(this.h, (C.double)(param1), (C.char)(f), (C.int)(prec))))
}
@ -1249,14 +1249,14 @@ func QByteArray_Number24(param1 uint64, base int) *QByteArray {
return _goptr
}
func QByteArray_Number25(param1 float64, f byte) *QByteArray {
func QByteArray_Number25(param1 float64, f int8) *QByteArray {
_ret := C.QByteArray_Number25((C.double)(param1), (C.char)(f))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QByteArray_Number3(param1 float64, f byte, prec int) *QByteArray {
func QByteArray_Number3(param1 float64, f int8, prec int) *QByteArray {
_ret := C.QByteArray_Number3((C.double)(param1), (C.char)(f), (C.int)(prec))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
@ -1270,7 +1270,7 @@ func QByteArray_FromBase64Encoding2(base64 *QByteArray, options QByteArray__Base
return _goptr
}
func QByteArray_FromPercentEncoding2(pctEncoded *QByteArray, percent byte) *QByteArray {
func QByteArray_FromPercentEncoding2(pctEncoded *QByteArray, percent int8) *QByteArray {
_ret := C.QByteArray_FromPercentEncoding2(pctEncoded.cPointer(), (C.char)(percent))
_goptr := newQByteArray(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
@ -1319,7 +1319,7 @@ func NewQByteRef(param1 *QByteRef) *QByteRef {
return newQByteRef(ret)
}
func (this *QByteRef) OperatorAssign(c byte) {
func (this *QByteRef) OperatorAssign(c int8) {
C.QByteRef_OperatorAssign(this.h, (C.char)(c))
}
@ -1327,27 +1327,27 @@ func (this *QByteRef) OperatorAssignWithQByteRef(c *QByteRef) {
C.QByteRef_OperatorAssignWithQByteRef(this.h, c.cPointer())
}
func (this *QByteRef) OperatorEqual(c byte) bool {
func (this *QByteRef) OperatorEqual(c int8) bool {
return (bool)(C.QByteRef_OperatorEqual(this.h, (C.char)(c)))
}
func (this *QByteRef) OperatorNotEqual(c byte) bool {
func (this *QByteRef) OperatorNotEqual(c int8) bool {
return (bool)(C.QByteRef_OperatorNotEqual(this.h, (C.char)(c)))
}
func (this *QByteRef) OperatorGreater(c byte) bool {
func (this *QByteRef) OperatorGreater(c int8) bool {
return (bool)(C.QByteRef_OperatorGreater(this.h, (C.char)(c)))
}
func (this *QByteRef) OperatorGreaterOrEqual(c byte) bool {
func (this *QByteRef) OperatorGreaterOrEqual(c int8) bool {
return (bool)(C.QByteRef_OperatorGreaterOrEqual(this.h, (C.char)(c)))
}
func (this *QByteRef) OperatorLesser(c byte) bool {
func (this *QByteRef) OperatorLesser(c int8) bool {
return (bool)(C.QByteRef_OperatorLesser(this.h, (C.char)(c)))
}
func (this *QByteRef) OperatorLesserOrEqual(c byte) bool {
func (this *QByteRef) OperatorLesserOrEqual(c int8) bool {
return (bool)(C.QByteRef_OperatorLesserOrEqual(this.h, (C.char)(c)))
}

View File

@ -32,8 +32,9 @@ QCborValue* QCborArray_ToCborValue(const QCborArray* self) {
return new QCborValue(self->toCborValue());
}
size_t QCborArray_Size(const QCborArray* self) {
return self->size();
ptrdiff_t QCborArray_Size(const QCborArray* self) {
qsizetype _ret = self->size();
return static_cast<ptrdiff_t>(_ret);
}
bool QCborArray_IsEmpty(const QCborArray* self) {
@ -44,8 +45,8 @@ void QCborArray_Clear(QCborArray* self) {
self->clear();
}
QCborValue* QCborArray_At(const QCborArray* self, size_t i) {
return new QCborValue(self->at(static_cast<qsizetype>(i)));
QCborValue* QCborArray_At(const QCborArray* self, ptrdiff_t i) {
return new QCborValue(self->at((qsizetype)(i)));
}
QCborValue* QCborArray_First(const QCborArray* self) {
@ -56,8 +57,8 @@ QCborValue* QCborArray_Last(const QCborArray* self) {
return new QCborValue(self->last());
}
QCborValue* QCborArray_OperatorSubscript(const QCborArray* self, size_t i) {
return new QCborValue(self->operator[](static_cast<qsizetype>(i)));
QCborValue* QCborArray_OperatorSubscript(const QCborArray* self, ptrdiff_t i) {
return new QCborValue(self->operator[]((qsizetype)(i)));
}
QCborValueRef* QCborArray_First2(QCborArray* self) {
@ -68,12 +69,12 @@ QCborValueRef* QCborArray_Last2(QCborArray* self) {
return new QCborValueRef(self->last());
}
QCborValueRef* QCborArray_OperatorSubscriptWithQsizetype(QCborArray* self, size_t i) {
return new QCborValueRef(self->operator[](static_cast<qsizetype>(i)));
QCborValueRef* QCborArray_OperatorSubscriptWithQsizetype(QCborArray* self, ptrdiff_t i) {
return new QCborValueRef(self->operator[]((qsizetype)(i)));
}
void QCborArray_Insert(QCborArray* self, size_t i, QCborValue* value) {
self->insert(static_cast<qsizetype>(i), *value);
void QCborArray_Insert(QCborArray* self, ptrdiff_t i, QCborValue* value) {
self->insert((qsizetype)(i), *value);
}
void QCborArray_Prepend(QCborArray* self, QCborValue* value) {
@ -92,12 +93,12 @@ QCborValue* QCborArray_ExtractWithIt(QCborArray* self, QCborArray__Iterator* it)
return new QCborValue(self->extract(*it));
}
void QCborArray_RemoveAt(QCborArray* self, size_t i) {
self->removeAt(static_cast<qsizetype>(i));
void QCborArray_RemoveAt(QCborArray* self, ptrdiff_t i) {
self->removeAt((qsizetype)(i));
}
QCborValue* QCborArray_TakeAt(QCborArray* self, size_t i) {
return new QCborValue(self->takeAt(static_cast<qsizetype>(i)));
QCborValue* QCborArray_TakeAt(QCborArray* self, ptrdiff_t i) {
return new QCborValue(self->takeAt((qsizetype)(i)));
}
void QCborArray_RemoveFirst(QCborArray* self) {
@ -263,8 +264,8 @@ QCborValueRef* QCborArray__Iterator_OperatorMinusGreater(const QCborArray__Itera
return self->operator->();
}
QCborValueRef* QCborArray__Iterator_OperatorSubscript(QCborArray__Iterator* self, size_t j) {
return new QCborValueRef(self->operator[](static_cast<qsizetype>(j)));
QCborValueRef* QCborArray__Iterator_OperatorSubscript(QCborArray__Iterator* self, ptrdiff_t j) {
return new QCborValueRef(self->operator[]((qsizetype)(j)));
}
bool QCborArray__Iterator_OperatorEqual(const QCborArray__Iterator* self, QCborArray__Iterator* o) {
@ -335,28 +336,29 @@ QCborArray__Iterator* QCborArray__Iterator_OperatorMinusMinusWithInt(QCborArray_
return new QCborArray::Iterator(self->operator--(static_cast<int>(param1)));
}
QCborArray__Iterator* QCborArray__Iterator_OperatorPlusAssign(QCborArray__Iterator* self, size_t j) {
QCborArray::Iterator& _ret = self->operator+=(static_cast<qsizetype>(j));
QCborArray__Iterator* QCborArray__Iterator_OperatorPlusAssign(QCborArray__Iterator* self, ptrdiff_t j) {
QCborArray::Iterator& _ret = self->operator+=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborArray__Iterator* QCborArray__Iterator_OperatorMinusAssign(QCborArray__Iterator* self, size_t j) {
QCborArray::Iterator& _ret = self->operator-=(static_cast<qsizetype>(j));
QCborArray__Iterator* QCborArray__Iterator_OperatorMinusAssign(QCborArray__Iterator* self, ptrdiff_t j) {
QCborArray::Iterator& _ret = self->operator-=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborArray__Iterator* QCborArray__Iterator_OperatorPlus(const QCborArray__Iterator* self, size_t j) {
return new QCborArray::Iterator(self->operator+(static_cast<qsizetype>(j)));
QCborArray__Iterator* QCborArray__Iterator_OperatorPlus(const QCborArray__Iterator* self, ptrdiff_t j) {
return new QCborArray::Iterator(self->operator+((qsizetype)(j)));
}
QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Iterator* self, size_t j) {
return new QCborArray::Iterator(self->operator-(static_cast<qsizetype>(j)));
QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Iterator* self, ptrdiff_t j) {
return new QCborArray::Iterator(self->operator-((qsizetype)(j)));
}
size_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j) {
return self->operator-(*j);
ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j) {
qsizetype _ret = self->operator-(*j);
return static_cast<ptrdiff_t>(_ret);
}
void QCborArray__Iterator_Delete(QCborArray__Iterator* self) {
@ -383,8 +385,8 @@ QCborValueRef* QCborArray__ConstIterator_OperatorMinusGreater(const QCborArray__
return (QCborValueRef*) self->operator->();
}
QCborValueRef* QCborArray__ConstIterator_OperatorSubscript(QCborArray__ConstIterator* self, size_t j) {
return new QCborValueRef(self->operator[](static_cast<qsizetype>(j)));
QCborValueRef* QCborArray__ConstIterator_OperatorSubscript(QCborArray__ConstIterator* self, ptrdiff_t j) {
return new QCborValueRef(self->operator[]((qsizetype)(j)));
}
bool QCborArray__ConstIterator_OperatorEqual(const QCborArray__ConstIterator* self, QCborArray__Iterator* o) {
@ -455,28 +457,29 @@ QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusMinusWithInt(Q
return new QCborArray::ConstIterator(self->operator--(static_cast<int>(param1)));
}
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlusAssign(QCborArray__ConstIterator* self, size_t j) {
QCborArray::ConstIterator& _ret = self->operator+=(static_cast<qsizetype>(j));
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlusAssign(QCborArray__ConstIterator* self, ptrdiff_t j) {
QCborArray::ConstIterator& _ret = self->operator+=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusAssign(QCborArray__ConstIterator* self, size_t j) {
QCborArray::ConstIterator& _ret = self->operator-=(static_cast<qsizetype>(j));
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusAssign(QCborArray__ConstIterator* self, ptrdiff_t j) {
QCborArray::ConstIterator& _ret = self->operator-=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlus(const QCborArray__ConstIterator* self, size_t j) {
return new QCborArray::ConstIterator(self->operator+(static_cast<qsizetype>(j)));
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlus(const QCborArray__ConstIterator* self, ptrdiff_t j) {
return new QCborArray::ConstIterator(self->operator+((qsizetype)(j)));
}
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinus(const QCborArray__ConstIterator* self, size_t j) {
return new QCborArray::ConstIterator(self->operator-(static_cast<qsizetype>(j)));
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinus(const QCborArray__ConstIterator* self, ptrdiff_t j) {
return new QCborArray::ConstIterator(self->operator-((qsizetype)(j)));
}
size_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(const QCborArray__ConstIterator* self, QCborArray__ConstIterator* j) {
return self->operator-(*j);
ptrdiff_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(const QCborArray__ConstIterator* self, QCborArray__ConstIterator* j) {
qsizetype _ret = self->operator-(*j);
return static_cast<ptrdiff_t>(_ret);
}
void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self) {

View File

@ -62,8 +62,8 @@ func (this *QCborArray) ToCborValue() *QCborValue {
return _goptr
}
func (this *QCborArray) Size() uint64 {
return (uint64)(C.QCborArray_Size(this.h))
func (this *QCborArray) Size() int64 {
return (int64)(C.QCborArray_Size(this.h))
}
func (this *QCborArray) IsEmpty() bool {
@ -74,8 +74,8 @@ func (this *QCborArray) Clear() {
C.QCborArray_Clear(this.h)
}
func (this *QCborArray) At(i uint64) *QCborValue {
_ret := C.QCborArray_At(this.h, (C.size_t)(i))
func (this *QCborArray) At(i int64) *QCborValue {
_ret := C.QCborArray_At(this.h, (C.ptrdiff_t)(i))
_goptr := newQCborValue(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
@ -95,8 +95,8 @@ func (this *QCborArray) Last() *QCborValue {
return _goptr
}
func (this *QCborArray) OperatorSubscript(i uint64) *QCborValue {
_ret := C.QCborArray_OperatorSubscript(this.h, (C.size_t)(i))
func (this *QCborArray) OperatorSubscript(i int64) *QCborValue {
_ret := C.QCborArray_OperatorSubscript(this.h, (C.ptrdiff_t)(i))
_goptr := newQCborValue(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
@ -116,15 +116,15 @@ func (this *QCborArray) Last2() *QCborValueRef {
return _goptr
}
func (this *QCborArray) OperatorSubscriptWithQsizetype(i uint64) *QCborValueRef {
_ret := C.QCborArray_OperatorSubscriptWithQsizetype(this.h, (C.size_t)(i))
func (this *QCborArray) OperatorSubscriptWithQsizetype(i int64) *QCborValueRef {
_ret := C.QCborArray_OperatorSubscriptWithQsizetype(this.h, (C.ptrdiff_t)(i))
_goptr := newQCborValueRef(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborArray) Insert(i uint64, value *QCborValue) {
C.QCborArray_Insert(this.h, (C.size_t)(i), value.cPointer())
func (this *QCborArray) Insert(i int64, value *QCborValue) {
C.QCborArray_Insert(this.h, (C.ptrdiff_t)(i), value.cPointer())
}
func (this *QCborArray) Prepend(value *QCborValue) {
@ -149,12 +149,12 @@ func (this *QCborArray) ExtractWithIt(it QCborArray__Iterator) *QCborValue {
return _goptr
}
func (this *QCborArray) RemoveAt(i uint64) {
C.QCborArray_RemoveAt(this.h, (C.size_t)(i))
func (this *QCborArray) RemoveAt(i int64) {
C.QCborArray_RemoveAt(this.h, (C.ptrdiff_t)(i))
}
func (this *QCborArray) TakeAt(i uint64) *QCborValue {
_ret := C.QCborArray_TakeAt(this.h, (C.size_t)(i))
func (this *QCborArray) TakeAt(i int64) *QCborValue {
_ret := C.QCborArray_TakeAt(this.h, (C.ptrdiff_t)(i))
_goptr := newQCborValue(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
@ -415,8 +415,8 @@ func (this *QCborArray__Iterator) OperatorMinusGreater() *QCborValueRef {
return newQCborValueRef_U(unsafe.Pointer(C.QCborArray__Iterator_OperatorMinusGreater(this.h)))
}
func (this *QCborArray__Iterator) OperatorSubscript(j uint64) *QCborValueRef {
_ret := C.QCborArray__Iterator_OperatorSubscript(this.h, (C.size_t)(j))
func (this *QCborArray__Iterator) OperatorSubscript(j int64) *QCborValueRef {
_ret := C.QCborArray__Iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborValueRef(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
@ -492,30 +492,30 @@ func (this *QCborArray__Iterator) OperatorMinusMinusWithInt(param1 int) *QCborAr
return _goptr
}
func (this *QCborArray__Iterator) OperatorPlusAssign(j uint64) *QCborArray__Iterator {
return newQCborArray__Iterator_U(unsafe.Pointer(C.QCborArray__Iterator_OperatorPlusAssign(this.h, (C.size_t)(j))))
func (this *QCborArray__Iterator) OperatorPlusAssign(j int64) *QCborArray__Iterator {
return newQCborArray__Iterator_U(unsafe.Pointer(C.QCborArray__Iterator_OperatorPlusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborArray__Iterator) OperatorMinusAssign(j uint64) *QCborArray__Iterator {
return newQCborArray__Iterator_U(unsafe.Pointer(C.QCborArray__Iterator_OperatorMinusAssign(this.h, (C.size_t)(j))))
func (this *QCborArray__Iterator) OperatorMinusAssign(j int64) *QCborArray__Iterator {
return newQCborArray__Iterator_U(unsafe.Pointer(C.QCborArray__Iterator_OperatorMinusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborArray__Iterator) OperatorPlus(j uint64) *QCborArray__Iterator {
_ret := C.QCborArray__Iterator_OperatorPlus(this.h, (C.size_t)(j))
func (this *QCborArray__Iterator) OperatorPlus(j int64) *QCborArray__Iterator {
_ret := C.QCborArray__Iterator_OperatorPlus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborArray__Iterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborArray__Iterator) OperatorMinus(j uint64) *QCborArray__Iterator {
_ret := C.QCborArray__Iterator_OperatorMinus(this.h, (C.size_t)(j))
func (this *QCborArray__Iterator) OperatorMinus(j int64) *QCborArray__Iterator {
_ret := C.QCborArray__Iterator_OperatorMinus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborArray__Iterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborArray__Iterator) OperatorMinusWithQCborArrayIterator(j QCborArray__Iterator) uint64 {
return (uint64)(C.QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(this.h, j.cPointer()))
func (this *QCborArray__Iterator) OperatorMinusWithQCborArrayIterator(j QCborArray__Iterator) int64 {
return (int64)(C.QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(this.h, j.cPointer()))
}
// Delete this object from C++ memory.
@ -581,8 +581,8 @@ func (this *QCborArray__ConstIterator) OperatorMinusGreater() *QCborValueRef {
return newQCborValueRef_U(unsafe.Pointer(C.QCborArray__ConstIterator_OperatorMinusGreater(this.h)))
}
func (this *QCborArray__ConstIterator) OperatorSubscript(j uint64) *QCborValueRef {
_ret := C.QCborArray__ConstIterator_OperatorSubscript(this.h, (C.size_t)(j))
func (this *QCborArray__ConstIterator) OperatorSubscript(j int64) *QCborValueRef {
_ret := C.QCborArray__ConstIterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborValueRef(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
@ -658,30 +658,30 @@ func (this *QCborArray__ConstIterator) OperatorMinusMinusWithInt(param1 int) *QC
return _goptr
}
func (this *QCborArray__ConstIterator) OperatorPlusAssign(j uint64) *QCborArray__ConstIterator {
return newQCborArray__ConstIterator_U(unsafe.Pointer(C.QCborArray__ConstIterator_OperatorPlusAssign(this.h, (C.size_t)(j))))
func (this *QCborArray__ConstIterator) OperatorPlusAssign(j int64) *QCborArray__ConstIterator {
return newQCborArray__ConstIterator_U(unsafe.Pointer(C.QCborArray__ConstIterator_OperatorPlusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborArray__ConstIterator) OperatorMinusAssign(j uint64) *QCborArray__ConstIterator {
return newQCborArray__ConstIterator_U(unsafe.Pointer(C.QCborArray__ConstIterator_OperatorMinusAssign(this.h, (C.size_t)(j))))
func (this *QCborArray__ConstIterator) OperatorMinusAssign(j int64) *QCborArray__ConstIterator {
return newQCborArray__ConstIterator_U(unsafe.Pointer(C.QCborArray__ConstIterator_OperatorMinusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborArray__ConstIterator) OperatorPlus(j uint64) *QCborArray__ConstIterator {
_ret := C.QCborArray__ConstIterator_OperatorPlus(this.h, (C.size_t)(j))
func (this *QCborArray__ConstIterator) OperatorPlus(j int64) *QCborArray__ConstIterator {
_ret := C.QCborArray__ConstIterator_OperatorPlus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborArray__ConstIterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborArray__ConstIterator) OperatorMinus(j uint64) *QCborArray__ConstIterator {
_ret := C.QCborArray__ConstIterator_OperatorMinus(this.h, (C.size_t)(j))
func (this *QCborArray__ConstIterator) OperatorMinus(j int64) *QCborArray__ConstIterator {
_ret := C.QCborArray__ConstIterator_OperatorMinus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborArray__ConstIterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborArray__ConstIterator) OperatorMinusWithQCborArrayConstIterator(j QCborArray__ConstIterator) uint64 {
return (uint64)(C.QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(this.h, j.cPointer()))
func (this *QCborArray__ConstIterator) OperatorMinusWithQCborArrayConstIterator(j QCborArray__ConstIterator) int64 {
return (int64)(C.QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(this.h, j.cPointer()))
}
// Delete this object from C++ memory.

View File

@ -42,23 +42,23 @@ QCborArray* QCborArray_new2(QCborArray* other);
void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other);
void QCborArray_Swap(QCborArray* self, QCborArray* other);
QCborValue* QCborArray_ToCborValue(const QCborArray* self);
size_t QCborArray_Size(const QCborArray* self);
ptrdiff_t QCborArray_Size(const QCborArray* self);
bool QCborArray_IsEmpty(const QCborArray* self);
void QCborArray_Clear(QCborArray* self);
QCborValue* QCborArray_At(const QCborArray* self, size_t i);
QCborValue* QCborArray_At(const QCborArray* self, ptrdiff_t i);
QCborValue* QCborArray_First(const QCborArray* self);
QCborValue* QCborArray_Last(const QCborArray* self);
QCborValue* QCborArray_OperatorSubscript(const QCborArray* self, size_t i);
QCborValue* QCborArray_OperatorSubscript(const QCborArray* self, ptrdiff_t i);
QCborValueRef* QCborArray_First2(QCborArray* self);
QCborValueRef* QCborArray_Last2(QCborArray* self);
QCborValueRef* QCborArray_OperatorSubscriptWithQsizetype(QCborArray* self, size_t i);
void QCborArray_Insert(QCborArray* self, size_t i, QCborValue* value);
QCborValueRef* QCborArray_OperatorSubscriptWithQsizetype(QCborArray* self, ptrdiff_t i);
void QCborArray_Insert(QCborArray* self, ptrdiff_t i, QCborValue* value);
void QCborArray_Prepend(QCborArray* self, QCborValue* value);
void QCborArray_Append(QCborArray* self, QCborValue* value);
QCborValue* QCborArray_Extract(QCborArray* self, QCborArray__ConstIterator* it);
QCborValue* QCborArray_ExtractWithIt(QCborArray* self, QCborArray__Iterator* it);
void QCborArray_RemoveAt(QCborArray* self, size_t i);
QCborValue* QCborArray_TakeAt(QCborArray* self, size_t i);
void QCborArray_RemoveAt(QCborArray* self, ptrdiff_t i);
QCborValue* QCborArray_TakeAt(QCborArray* self, ptrdiff_t i);
void QCborArray_RemoveFirst(QCborArray* self);
void QCborArray_RemoveLast(QCborArray* self);
QCborValue* QCborArray_TakeFirst(QCborArray* self);
@ -98,7 +98,7 @@ QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1);
void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other);
QCborValueRef* QCborArray__Iterator_OperatorMultiply(const QCborArray__Iterator* self);
QCborValueRef* QCborArray__Iterator_OperatorMinusGreater(const QCborArray__Iterator* self);
QCborValueRef* QCborArray__Iterator_OperatorSubscript(QCborArray__Iterator* self, size_t j);
QCborValueRef* QCborArray__Iterator_OperatorSubscript(QCborArray__Iterator* self, ptrdiff_t j);
bool QCborArray__Iterator_OperatorEqual(const QCborArray__Iterator* self, QCborArray__Iterator* o);
bool QCborArray__Iterator_OperatorNotEqual(const QCborArray__Iterator* self, QCborArray__Iterator* o);
bool QCborArray__Iterator_OperatorLesser(const QCborArray__Iterator* self, QCborArray__Iterator* other);
@ -115,11 +115,11 @@ QCborArray__Iterator* QCborArray__Iterator_OperatorPlusPlus(QCborArray__Iterator
QCborArray__Iterator* QCborArray__Iterator_OperatorPlusPlusWithInt(QCborArray__Iterator* self, int param1);
QCborArray__Iterator* QCborArray__Iterator_OperatorMinusMinus(QCborArray__Iterator* self);
QCborArray__Iterator* QCborArray__Iterator_OperatorMinusMinusWithInt(QCborArray__Iterator* self, int param1);
QCborArray__Iterator* QCborArray__Iterator_OperatorPlusAssign(QCborArray__Iterator* self, size_t j);
QCborArray__Iterator* QCborArray__Iterator_OperatorMinusAssign(QCborArray__Iterator* self, size_t j);
QCborArray__Iterator* QCborArray__Iterator_OperatorPlus(const QCborArray__Iterator* self, size_t j);
QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Iterator* self, size_t j);
size_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j);
QCborArray__Iterator* QCborArray__Iterator_OperatorPlusAssign(QCborArray__Iterator* self, ptrdiff_t j);
QCborArray__Iterator* QCborArray__Iterator_OperatorMinusAssign(QCborArray__Iterator* self, ptrdiff_t j);
QCborArray__Iterator* QCborArray__Iterator_OperatorPlus(const QCborArray__Iterator* self, ptrdiff_t j);
QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Iterator* self, ptrdiff_t j);
ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j);
void QCborArray__Iterator_Delete(QCborArray__Iterator* self);
QCborArray__ConstIterator* QCborArray__ConstIterator_new();
@ -127,7 +127,7 @@ QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstItera
void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other);
QCborValueRef* QCborArray__ConstIterator_OperatorMultiply(const QCborArray__ConstIterator* self);
QCborValueRef* QCborArray__ConstIterator_OperatorMinusGreater(const QCborArray__ConstIterator* self);
QCborValueRef* QCborArray__ConstIterator_OperatorSubscript(QCborArray__ConstIterator* self, size_t j);
QCborValueRef* QCborArray__ConstIterator_OperatorSubscript(QCborArray__ConstIterator* self, ptrdiff_t j);
bool QCborArray__ConstIterator_OperatorEqual(const QCborArray__ConstIterator* self, QCborArray__Iterator* o);
bool QCborArray__ConstIterator_OperatorNotEqual(const QCborArray__ConstIterator* self, QCborArray__Iterator* o);
bool QCborArray__ConstIterator_OperatorLesser(const QCborArray__ConstIterator* self, QCborArray__Iterator* other);
@ -144,11 +144,11 @@ QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlusPlus(QCborArray
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlusPlusWithInt(QCborArray__ConstIterator* self, int param1);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusMinus(QCborArray__ConstIterator* self);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusMinusWithInt(QCborArray__ConstIterator* self, int param1);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlusAssign(QCborArray__ConstIterator* self, size_t j);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusAssign(QCborArray__ConstIterator* self, size_t j);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlus(const QCborArray__ConstIterator* self, size_t j);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinus(const QCborArray__ConstIterator* self, size_t j);
size_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(const QCborArray__ConstIterator* self, QCborArray__ConstIterator* j);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlusAssign(QCborArray__ConstIterator* self, ptrdiff_t j);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinusAssign(QCborArray__ConstIterator* self, ptrdiff_t j);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorPlus(const QCborArray__ConstIterator* self, ptrdiff_t j);
QCborArray__ConstIterator* QCborArray__ConstIterator_OperatorMinus(const QCborArray__ConstIterator* self, ptrdiff_t j);
ptrdiff_t QCborArray__ConstIterator_OperatorMinusWithQCborArrayConstIterator(const QCborArray__ConstIterator* self, QCborArray__ConstIterator* j);
void QCborArray__ConstIterator_Delete(QCborArray__ConstIterator* self);
#ifdef __cplusplus

View File

@ -32,8 +32,9 @@ QCborValue* QCborMap_ToCborValue(const QCborMap* self) {
return new QCborValue(self->toCborValue());
}
size_t QCborMap_Size(const QCborMap* self) {
return self->size();
ptrdiff_t QCborMap_Size(const QCborMap* self) {
qsizetype _ret = self->size();
return static_cast<ptrdiff_t>(_ret);
}
bool QCborMap_IsEmpty(const QCborMap* self) {
@ -359,28 +360,29 @@ QCborMap__Iterator* QCborMap__Iterator_OperatorMinusMinusWithInt(QCborMap__Itera
return new QCborMap::Iterator(self->operator--(static_cast<int>(param1)));
}
QCborMap__Iterator* QCborMap__Iterator_OperatorPlusAssign(QCborMap__Iterator* self, size_t j) {
QCborMap::Iterator& _ret = self->operator+=(static_cast<qsizetype>(j));
QCborMap__Iterator* QCborMap__Iterator_OperatorPlusAssign(QCborMap__Iterator* self, ptrdiff_t j) {
QCborMap::Iterator& _ret = self->operator+=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborMap__Iterator* QCborMap__Iterator_OperatorMinusAssign(QCborMap__Iterator* self, size_t j) {
QCborMap::Iterator& _ret = self->operator-=(static_cast<qsizetype>(j));
QCborMap__Iterator* QCborMap__Iterator_OperatorMinusAssign(QCborMap__Iterator* self, ptrdiff_t j) {
QCborMap::Iterator& _ret = self->operator-=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborMap__Iterator* QCborMap__Iterator_OperatorPlus(const QCborMap__Iterator* self, size_t j) {
return new QCborMap::Iterator(self->operator+(static_cast<qsizetype>(j)));
QCborMap__Iterator* QCborMap__Iterator_OperatorPlus(const QCborMap__Iterator* self, ptrdiff_t j) {
return new QCborMap::Iterator(self->operator+((qsizetype)(j)));
}
QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* self, size_t j) {
return new QCborMap::Iterator(self->operator-(static_cast<qsizetype>(j)));
QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* self, ptrdiff_t j) {
return new QCborMap::Iterator(self->operator-((qsizetype)(j)));
}
size_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j) {
return self->operator-(*j);
ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j) {
qsizetype _ret = self->operator-(*j);
return static_cast<ptrdiff_t>(_ret);
}
void QCborMap__Iterator_Delete(QCborMap__Iterator* self) {
@ -479,28 +481,29 @@ QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusMinusWithInt(QCbor
return new QCborMap::ConstIterator(self->operator--(static_cast<int>(param1)));
}
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlusAssign(QCborMap__ConstIterator* self, size_t j) {
QCborMap::ConstIterator& _ret = self->operator+=(static_cast<qsizetype>(j));
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlusAssign(QCborMap__ConstIterator* self, ptrdiff_t j) {
QCborMap::ConstIterator& _ret = self->operator+=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusAssign(QCborMap__ConstIterator* self, size_t j) {
QCborMap::ConstIterator& _ret = self->operator-=(static_cast<qsizetype>(j));
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusAssign(QCborMap__ConstIterator* self, ptrdiff_t j) {
QCborMap::ConstIterator& _ret = self->operator-=((qsizetype)(j));
// Cast returned reference into pointer
return &_ret;
}
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlus(const QCborMap__ConstIterator* self, size_t j) {
return new QCborMap::ConstIterator(self->operator+(static_cast<qsizetype>(j)));
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlus(const QCborMap__ConstIterator* self, ptrdiff_t j) {
return new QCborMap::ConstIterator(self->operator+((qsizetype)(j)));
}
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinus(const QCborMap__ConstIterator* self, size_t j) {
return new QCborMap::ConstIterator(self->operator-(static_cast<qsizetype>(j)));
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinus(const QCborMap__ConstIterator* self, ptrdiff_t j) {
return new QCborMap::ConstIterator(self->operator-((qsizetype)(j)));
}
size_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const QCborMap__ConstIterator* self, QCborMap__ConstIterator* j) {
return self->operator-(*j);
ptrdiff_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const QCborMap__ConstIterator* self, QCborMap__ConstIterator* j) {
qsizetype _ret = self->operator-(*j);
return static_cast<ptrdiff_t>(_ret);
}
void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self) {

View File

@ -62,8 +62,8 @@ func (this *QCborMap) ToCborValue() *QCborValue {
return _goptr
}
func (this *QCborMap) Size() uint64 {
return (uint64)(C.QCborMap_Size(this.h))
func (this *QCborMap) Size() int64 {
return (int64)(C.QCborMap_Size(this.h))
}
func (this *QCborMap) IsEmpty() bool {
@ -558,30 +558,30 @@ func (this *QCborMap__Iterator) OperatorMinusMinusWithInt(param1 int) *QCborMap_
return _goptr
}
func (this *QCborMap__Iterator) OperatorPlusAssign(j uint64) *QCborMap__Iterator {
return newQCborMap__Iterator_U(unsafe.Pointer(C.QCborMap__Iterator_OperatorPlusAssign(this.h, (C.size_t)(j))))
func (this *QCborMap__Iterator) OperatorPlusAssign(j int64) *QCborMap__Iterator {
return newQCborMap__Iterator_U(unsafe.Pointer(C.QCborMap__Iterator_OperatorPlusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborMap__Iterator) OperatorMinusAssign(j uint64) *QCborMap__Iterator {
return newQCborMap__Iterator_U(unsafe.Pointer(C.QCborMap__Iterator_OperatorMinusAssign(this.h, (C.size_t)(j))))
func (this *QCborMap__Iterator) OperatorMinusAssign(j int64) *QCborMap__Iterator {
return newQCborMap__Iterator_U(unsafe.Pointer(C.QCborMap__Iterator_OperatorMinusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborMap__Iterator) OperatorPlus(j uint64) *QCborMap__Iterator {
_ret := C.QCborMap__Iterator_OperatorPlus(this.h, (C.size_t)(j))
func (this *QCborMap__Iterator) OperatorPlus(j int64) *QCborMap__Iterator {
_ret := C.QCborMap__Iterator_OperatorPlus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborMap__Iterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborMap__Iterator) OperatorMinus(j uint64) *QCborMap__Iterator {
_ret := C.QCborMap__Iterator_OperatorMinus(this.h, (C.size_t)(j))
func (this *QCborMap__Iterator) OperatorMinus(j int64) *QCborMap__Iterator {
_ret := C.QCborMap__Iterator_OperatorMinus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborMap__Iterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborMap__Iterator) OperatorMinusWithQCborMapIterator(j QCborMap__Iterator) uint64 {
return (uint64)(C.QCborMap__Iterator_OperatorMinusWithQCborMapIterator(this.h, j.cPointer()))
func (this *QCborMap__Iterator) OperatorMinusWithQCborMapIterator(j QCborMap__Iterator) int64 {
return (int64)(C.QCborMap__Iterator_OperatorMinusWithQCborMapIterator(this.h, j.cPointer()))
}
// Delete this object from C++ memory.
@ -724,30 +724,30 @@ func (this *QCborMap__ConstIterator) OperatorMinusMinusWithInt(param1 int) *QCbo
return _goptr
}
func (this *QCborMap__ConstIterator) OperatorPlusAssign(j uint64) *QCborMap__ConstIterator {
return newQCborMap__ConstIterator_U(unsafe.Pointer(C.QCborMap__ConstIterator_OperatorPlusAssign(this.h, (C.size_t)(j))))
func (this *QCborMap__ConstIterator) OperatorPlusAssign(j int64) *QCborMap__ConstIterator {
return newQCborMap__ConstIterator_U(unsafe.Pointer(C.QCborMap__ConstIterator_OperatorPlusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborMap__ConstIterator) OperatorMinusAssign(j uint64) *QCborMap__ConstIterator {
return newQCborMap__ConstIterator_U(unsafe.Pointer(C.QCborMap__ConstIterator_OperatorMinusAssign(this.h, (C.size_t)(j))))
func (this *QCborMap__ConstIterator) OperatorMinusAssign(j int64) *QCborMap__ConstIterator {
return newQCborMap__ConstIterator_U(unsafe.Pointer(C.QCborMap__ConstIterator_OperatorMinusAssign(this.h, (C.ptrdiff_t)(j))))
}
func (this *QCborMap__ConstIterator) OperatorPlus(j uint64) *QCborMap__ConstIterator {
_ret := C.QCborMap__ConstIterator_OperatorPlus(this.h, (C.size_t)(j))
func (this *QCborMap__ConstIterator) OperatorPlus(j int64) *QCborMap__ConstIterator {
_ret := C.QCborMap__ConstIterator_OperatorPlus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborMap__ConstIterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborMap__ConstIterator) OperatorMinus(j uint64) *QCborMap__ConstIterator {
_ret := C.QCborMap__ConstIterator_OperatorMinus(this.h, (C.size_t)(j))
func (this *QCborMap__ConstIterator) OperatorMinus(j int64) *QCborMap__ConstIterator {
_ret := C.QCborMap__ConstIterator_OperatorMinus(this.h, (C.ptrdiff_t)(j))
_goptr := newQCborMap__ConstIterator(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QCborMap__ConstIterator) OperatorMinusWithQCborMapConstIterator(j QCborMap__ConstIterator) uint64 {
return (uint64)(C.QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(this.h, j.cPointer()))
func (this *QCborMap__ConstIterator) OperatorMinusWithQCborMapConstIterator(j QCborMap__ConstIterator) int64 {
return (int64)(C.QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(this.h, j.cPointer()))
}
// Delete this object from C++ memory.

View File

@ -42,7 +42,7 @@ QCborMap* QCborMap_new2(QCborMap* other);
void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other);
void QCborMap_Swap(QCborMap* self, QCborMap* other);
QCborValue* QCborMap_ToCborValue(const QCborMap* self);
size_t QCborMap_Size(const QCborMap* self);
ptrdiff_t QCborMap_Size(const QCborMap* self);
bool QCborMap_IsEmpty(const QCborMap* self);
void QCborMap_Clear(QCborMap* self);
struct miqt_array* QCborMap_Keys(const QCborMap* self);
@ -119,11 +119,11 @@ QCborMap__Iterator* QCborMap__Iterator_OperatorPlusPlus(QCborMap__Iterator* self
QCborMap__Iterator* QCborMap__Iterator_OperatorPlusPlusWithInt(QCborMap__Iterator* self, int param1);
QCborMap__Iterator* QCborMap__Iterator_OperatorMinusMinus(QCborMap__Iterator* self);
QCborMap__Iterator* QCborMap__Iterator_OperatorMinusMinusWithInt(QCborMap__Iterator* self, int param1);
QCborMap__Iterator* QCborMap__Iterator_OperatorPlusAssign(QCborMap__Iterator* self, size_t j);
QCborMap__Iterator* QCborMap__Iterator_OperatorMinusAssign(QCborMap__Iterator* self, size_t j);
QCborMap__Iterator* QCborMap__Iterator_OperatorPlus(const QCborMap__Iterator* self, size_t j);
QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* self, size_t j);
size_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j);
QCborMap__Iterator* QCborMap__Iterator_OperatorPlusAssign(QCborMap__Iterator* self, ptrdiff_t j);
QCborMap__Iterator* QCborMap__Iterator_OperatorMinusAssign(QCborMap__Iterator* self, ptrdiff_t j);
QCborMap__Iterator* QCborMap__Iterator_OperatorPlus(const QCborMap__Iterator* self, ptrdiff_t j);
QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* self, ptrdiff_t j);
ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j);
void QCborMap__Iterator_Delete(QCborMap__Iterator* self);
QCborMap__ConstIterator* QCborMap__ConstIterator_new();
@ -148,11 +148,11 @@ QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlusPlus(QCborMap__Cons
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlusPlusWithInt(QCborMap__ConstIterator* self, int param1);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusMinus(QCborMap__ConstIterator* self);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusMinusWithInt(QCborMap__ConstIterator* self, int param1);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlusAssign(QCborMap__ConstIterator* self, size_t j);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusAssign(QCborMap__ConstIterator* self, size_t j);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlus(const QCborMap__ConstIterator* self, size_t j);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinus(const QCborMap__ConstIterator* self, size_t j);
size_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const QCborMap__ConstIterator* self, QCborMap__ConstIterator* j);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlusAssign(QCborMap__ConstIterator* self, ptrdiff_t j);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinusAssign(QCborMap__ConstIterator* self, ptrdiff_t j);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorPlus(const QCborMap__ConstIterator* self, ptrdiff_t j);
QCborMap__ConstIterator* QCborMap__ConstIterator_OperatorMinus(const QCborMap__ConstIterator* self, ptrdiff_t j);
ptrdiff_t QCborMap__ConstIterator_OperatorMinusWithQCborMapConstIterator(const QCborMap__ConstIterator* self, QCborMap__ConstIterator* j);
void QCborMap__ConstIterator_Delete(QCborMap__ConstIterator* self);
#ifdef __cplusplus

View File

@ -10,12 +10,12 @@ QCborStreamReader* QCborStreamReader_new() {
return new QCborStreamReader();
}
QCborStreamReader* QCborStreamReader_new2(const char* data, size_t lenVal) {
return new QCborStreamReader(data, static_cast<qsizetype>(lenVal));
QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal) {
return new QCborStreamReader(data, (qsizetype)(lenVal));
}
QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, size_t lenVal) {
return new QCborStreamReader(static_cast<const quint8*>(data), static_cast<qsizetype>(lenVal));
QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal) {
return new QCborStreamReader(static_cast<const quint8*>(data), (qsizetype)(lenVal));
}
QCborStreamReader* QCborStreamReader_new4(QByteArray* data) {
@ -38,12 +38,12 @@ void QCborStreamReader_AddData(QCborStreamReader* self, QByteArray* data) {
self->addData(*data);
}
void QCborStreamReader_AddData2(QCborStreamReader* self, const char* data, size_t lenVal) {
self->addData(data, static_cast<qsizetype>(lenVal));
void QCborStreamReader_AddData2(QCborStreamReader* self, const char* data, ptrdiff_t lenVal) {
self->addData(data, (qsizetype)(lenVal));
}
void QCborStreamReader_AddData3(QCborStreamReader* self, const unsigned char* data, size_t lenVal) {
self->addData(static_cast<const quint8*>(data), static_cast<qsizetype>(lenVal));
void QCborStreamReader_AddData3(QCborStreamReader* self, const unsigned char* data, ptrdiff_t lenVal) {
self->addData(static_cast<const quint8*>(data), (qsizetype)(lenVal));
}
void QCborStreamReader_Reparse(QCborStreamReader* self) {
@ -190,8 +190,9 @@ bool QCborStreamReader_LeaveContainer(QCborStreamReader* self) {
return self->leaveContainer();
}
size_t QCborStreamReader_CurrentStringChunkSize(const QCborStreamReader* self) {
return self->currentStringChunkSize();
ptrdiff_t QCborStreamReader_CurrentStringChunkSize(const QCborStreamReader* self) {
qsizetype _ret = self->currentStringChunkSize();
return static_cast<ptrdiff_t>(_ret);
}
bool QCborStreamReader_ToBool(const QCborStreamReader* self) {

View File

@ -70,16 +70,16 @@ func NewQCborStreamReader() *QCborStreamReader {
}
// NewQCborStreamReader2 constructs a new QCborStreamReader object.
func NewQCborStreamReader2(data string, lenVal uint64) *QCborStreamReader {
func NewQCborStreamReader2(data string, lenVal int64) *QCborStreamReader {
data_Cstring := C.CString(data)
defer C.free(unsafe.Pointer(data_Cstring))
ret := C.QCborStreamReader_new2(data_Cstring, (C.size_t)(lenVal))
ret := C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal))
return newQCborStreamReader(ret)
}
// NewQCborStreamReader3 constructs a new QCborStreamReader object.
func NewQCborStreamReader3(data *byte, lenVal uint64) *QCborStreamReader {
ret := C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.size_t)(lenVal))
func NewQCborStreamReader3(data *byte, lenVal int64) *QCborStreamReader {
ret := C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal))
return newQCborStreamReader(ret)
}
@ -107,14 +107,14 @@ func (this *QCborStreamReader) AddData(data *QByteArray) {
C.QCborStreamReader_AddData(this.h, data.cPointer())
}
func (this *QCborStreamReader) AddData2(data string, lenVal uint64) {
func (this *QCborStreamReader) AddData2(data string, lenVal int64) {
data_Cstring := C.CString(data)
defer C.free(unsafe.Pointer(data_Cstring))
C.QCborStreamReader_AddData2(this.h, data_Cstring, (C.size_t)(lenVal))
C.QCborStreamReader_AddData2(this.h, data_Cstring, (C.ptrdiff_t)(lenVal))
}
func (this *QCborStreamReader) AddData3(data *byte, lenVal uint64) {
C.QCborStreamReader_AddData3(this.h, (*C.uchar)(unsafe.Pointer(data)), (C.size_t)(lenVal))
func (this *QCborStreamReader) AddData3(data *byte, lenVal int64) {
C.QCborStreamReader_AddData3(this.h, (*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal))
}
func (this *QCborStreamReader) Reparse() {
@ -260,8 +260,8 @@ func (this *QCborStreamReader) LeaveContainer() bool {
return (bool)(C.QCborStreamReader_LeaveContainer(this.h))
}
func (this *QCborStreamReader) CurrentStringChunkSize() uint64 {
return (uint64)(C.QCborStreamReader_CurrentStringChunkSize(this.h))
func (this *QCborStreamReader) CurrentStringChunkSize() int64 {
return (int64)(C.QCborStreamReader_CurrentStringChunkSize(this.h))
}
func (this *QCborStreamReader) ToBool() bool {

View File

@ -26,15 +26,15 @@ typedef struct QIODevice QIODevice;
#endif
QCborStreamReader* QCborStreamReader_new();
QCborStreamReader* QCborStreamReader_new2(const char* data, size_t lenVal);
QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, size_t lenVal);
QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal);
QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal);
QCborStreamReader* QCborStreamReader_new4(QByteArray* data);
QCborStreamReader* QCborStreamReader_new5(QIODevice* device);
void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device);
QIODevice* QCborStreamReader_Device(const QCborStreamReader* self);
void QCborStreamReader_AddData(QCborStreamReader* self, QByteArray* data);
void QCborStreamReader_AddData2(QCborStreamReader* self, const char* data, size_t lenVal);
void QCborStreamReader_AddData3(QCborStreamReader* self, const unsigned char* data, size_t lenVal);
void QCborStreamReader_AddData2(QCborStreamReader* self, const char* data, ptrdiff_t lenVal);
void QCborStreamReader_AddData3(QCborStreamReader* self, const unsigned char* data, ptrdiff_t lenVal);
void QCborStreamReader_Reparse(QCborStreamReader* self);
void QCborStreamReader_Clear(QCborStreamReader* self);
void QCborStreamReader_Reset(QCborStreamReader* self);
@ -70,7 +70,7 @@ unsigned long long QCborStreamReader_Length(const QCborStreamReader* self);
bool QCborStreamReader_IsContainer(const QCborStreamReader* self);
bool QCborStreamReader_EnterContainer(QCborStreamReader* self);
bool QCborStreamReader_LeaveContainer(QCborStreamReader* self);
size_t QCborStreamReader_CurrentStringChunkSize(const QCborStreamReader* self);
ptrdiff_t QCborStreamReader_CurrentStringChunkSize(const QCborStreamReader* self);
bool QCborStreamReader_ToBool(const QCborStreamReader* self);
uint64_t QCborStreamReader_ToTag(const QCborStreamReader* self);
unsigned long long QCborStreamReader_ToUnsignedInteger(const QCborStreamReader* self);

View File

@ -57,12 +57,12 @@ void QCborStreamWriter_AppendWithDouble(QCborStreamWriter* self, double d) {
self->append(static_cast<double>(d));
}
void QCborStreamWriter_AppendByteString(QCborStreamWriter* self, const char* data, size_t lenVal) {
self->appendByteString(data, static_cast<qsizetype>(lenVal));
void QCborStreamWriter_AppendByteString(QCborStreamWriter* self, const char* data, ptrdiff_t lenVal) {
self->appendByteString(data, (qsizetype)(lenVal));
}
void QCborStreamWriter_AppendTextString(QCborStreamWriter* self, const char* utf8, size_t lenVal) {
self->appendTextString(utf8, static_cast<qsizetype>(lenVal));
void QCborStreamWriter_AppendTextString(QCborStreamWriter* self, const char* utf8, ptrdiff_t lenVal) {
self->appendTextString(utf8, (qsizetype)(lenVal));
}
void QCborStreamWriter_AppendWithBool(QCborStreamWriter* self, bool b) {
@ -113,8 +113,8 @@ bool QCborStreamWriter_EndMap(QCborStreamWriter* self) {
return self->endMap();
}
void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, size_t size) {
self->append(str, static_cast<qsizetype>(size));
void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, ptrdiff_t size) {
self->append(str, (qsizetype)(size));
}
void QCborStreamWriter_Delete(QCborStreamWriter* self) {

View File

@ -91,16 +91,16 @@ func (this *QCborStreamWriter) AppendWithDouble(d float64) {
C.QCborStreamWriter_AppendWithDouble(this.h, (C.double)(d))
}
func (this *QCborStreamWriter) AppendByteString(data string, lenVal uint64) {
func (this *QCborStreamWriter) AppendByteString(data string, lenVal int64) {
data_Cstring := C.CString(data)
defer C.free(unsafe.Pointer(data_Cstring))
C.QCborStreamWriter_AppendByteString(this.h, data_Cstring, (C.size_t)(lenVal))
C.QCborStreamWriter_AppendByteString(this.h, data_Cstring, (C.ptrdiff_t)(lenVal))
}
func (this *QCborStreamWriter) AppendTextString(utf8 string, lenVal uint64) {
func (this *QCborStreamWriter) AppendTextString(utf8 string, lenVal int64) {
utf8_Cstring := C.CString(utf8)
defer C.free(unsafe.Pointer(utf8_Cstring))
C.QCborStreamWriter_AppendTextString(this.h, utf8_Cstring, (C.size_t)(lenVal))
C.QCborStreamWriter_AppendTextString(this.h, utf8_Cstring, (C.ptrdiff_t)(lenVal))
}
func (this *QCborStreamWriter) AppendWithBool(b bool) {
@ -153,10 +153,10 @@ func (this *QCborStreamWriter) EndMap() bool {
return (bool)(C.QCborStreamWriter_EndMap(this.h))
}
func (this *QCborStreamWriter) Append22(str string, size uint64) {
func (this *QCborStreamWriter) Append22(str string, size int64) {
str_Cstring := C.CString(str)
defer C.free(unsafe.Pointer(str_Cstring))
C.QCborStreamWriter_Append22(this.h, str_Cstring, (C.size_t)(size))
C.QCborStreamWriter_Append22(this.h, str_Cstring, (C.ptrdiff_t)(size))
}
// Delete this object from C++ memory.

View File

@ -36,8 +36,8 @@ void QCborStreamWriter_Append3(QCborStreamWriter* self, int tag);
void QCborStreamWriter_AppendWithSt(QCborStreamWriter* self, uint8_t st);
void QCborStreamWriter_AppendWithFloat(QCborStreamWriter* self, float f);
void QCborStreamWriter_AppendWithDouble(QCborStreamWriter* self, double d);
void QCborStreamWriter_AppendByteString(QCborStreamWriter* self, const char* data, size_t lenVal);
void QCborStreamWriter_AppendTextString(QCborStreamWriter* self, const char* utf8, size_t lenVal);
void QCborStreamWriter_AppendByteString(QCborStreamWriter* self, const char* data, ptrdiff_t lenVal);
void QCborStreamWriter_AppendTextString(QCborStreamWriter* self, const char* utf8, ptrdiff_t lenVal);
void QCborStreamWriter_AppendWithBool(QCborStreamWriter* self, bool b);
void QCborStreamWriter_AppendNull(QCborStreamWriter* self);
void QCborStreamWriter_AppendUndefined(QCborStreamWriter* self);
@ -50,7 +50,7 @@ bool QCborStreamWriter_EndArray(QCborStreamWriter* self);
void QCborStreamWriter_StartMap(QCborStreamWriter* self);
void QCborStreamWriter_StartMapWithCount(QCborStreamWriter* self, unsigned long long count);
bool QCborStreamWriter_EndMap(QCborStreamWriter* self);
void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, size_t size);
void QCborStreamWriter_Append22(QCborStreamWriter* self, const char* str, ptrdiff_t size);
void QCborStreamWriter_Delete(QCborStreamWriter* self);
#ifdef __cplusplus

View File

@ -340,12 +340,12 @@ QCborValue* QCborValue_FromCborWithBa(QByteArray* ba) {
return new QCborValue(QCborValue::fromCbor(*ba));
}
QCborValue* QCborValue_FromCbor2(const char* data, size_t lenVal) {
return new QCborValue(QCborValue::fromCbor(data, static_cast<qsizetype>(lenVal)));
QCborValue* QCborValue_FromCbor2(const char* data, ptrdiff_t lenVal) {
return new QCborValue(QCborValue::fromCbor(data, (qsizetype)(lenVal)));
}
QCborValue* QCborValue_FromCbor3(const unsigned char* data, size_t lenVal) {
return new QCborValue(QCborValue::fromCbor(static_cast<const quint8*>(data), static_cast<qsizetype>(lenVal)));
QCborValue* QCborValue_FromCbor3(const unsigned char* data, ptrdiff_t lenVal) {
return new QCborValue(QCborValue::fromCbor(static_cast<const quint8*>(data), (qsizetype)(lenVal)));
}
QByteArray* QCborValue_ToCbor(QCborValue* self) {
@ -422,12 +422,12 @@ QCborValue* QCborValue_FromCbor22(QByteArray* ba, QCborParserError* error) {
return new QCborValue(QCborValue::fromCbor(*ba, error));
}
QCborValue* QCborValue_FromCbor32(const char* data, size_t lenVal, QCborParserError* error) {
return new QCborValue(QCborValue::fromCbor(data, static_cast<qsizetype>(lenVal), error));
QCborValue* QCborValue_FromCbor32(const char* data, ptrdiff_t lenVal, QCborParserError* error) {
return new QCborValue(QCborValue::fromCbor(data, (qsizetype)(lenVal), error));
}
QCborValue* QCborValue_FromCbor33(const unsigned char* data, size_t lenVal, QCborParserError* error) {
return new QCborValue(QCborValue::fromCbor(static_cast<const quint8*>(data), static_cast<qsizetype>(lenVal), error));
QCborValue* QCborValue_FromCbor33(const unsigned char* data, ptrdiff_t lenVal, QCborParserError* error) {
return new QCborValue(QCborValue::fromCbor(static_cast<const quint8*>(data), (qsizetype)(lenVal), error));
}
QByteArray* QCborValue_ToCbor1(QCborValue* self, int opt) {

View File

@ -533,17 +533,17 @@ func QCborValue_FromCborWithBa(ba *QByteArray) *QCborValue {
return _goptr
}
func QCborValue_FromCbor2(data string, lenVal uint64) *QCborValue {
func QCborValue_FromCbor2(data string, lenVal int64) *QCborValue {
data_Cstring := C.CString(data)
defer C.free(unsafe.Pointer(data_Cstring))
_ret := C.QCborValue_FromCbor2(data_Cstring, (C.size_t)(lenVal))
_ret := C.QCborValue_FromCbor2(data_Cstring, (C.ptrdiff_t)(lenVal))
_goptr := newQCborValue(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QCborValue_FromCbor3(data *byte, lenVal uint64) *QCborValue {
_ret := C.QCborValue_FromCbor3((*C.uchar)(unsafe.Pointer(data)), (C.size_t)(lenVal))
func QCborValue_FromCbor3(data *byte, lenVal int64) *QCborValue {
_ret := C.QCborValue_FromCbor3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal))
_goptr := newQCborValue(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
@ -645,17 +645,17 @@ func QCborValue_FromCbor22(ba *QByteArray, error *QCborParserError) *QCborValue
return _goptr
}
func QCborValue_FromCbor32(data string, lenVal uint64, error *QCborParserError) *QCborValue {
func QCborValue_FromCbor32(data string, lenVal int64, error *QCborParserError) *QCborValue {
data_Cstring := C.CString(data)
defer C.free(unsafe.Pointer(data_Cstring))
_ret := C.QCborValue_FromCbor32(data_Cstring, (C.size_t)(lenVal), error.cPointer())
_ret := C.QCborValue_FromCbor32(data_Cstring, (C.ptrdiff_t)(lenVal), error.cPointer())
_goptr := newQCborValue(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func QCborValue_FromCbor33(data *byte, lenVal uint64, error *QCborParserError) *QCborValue {
_ret := C.QCborValue_FromCbor33((*C.uchar)(unsafe.Pointer(data)), (C.size_t)(lenVal), error.cPointer())
func QCborValue_FromCbor33(data *byte, lenVal int64, error *QCborParserError) *QCborValue {
_ret := C.QCborValue_FromCbor33((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal), error.cPointer())
_goptr := newQCborValue(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr

View File

@ -123,8 +123,8 @@ QCborValue* QCborValue_FromJsonValue(QJsonValue* v);
QJsonValue* QCborValue_ToJsonValue(const QCborValue* self);
QCborValue* QCborValue_FromCbor(QCborStreamReader* reader);
QCborValue* QCborValue_FromCborWithBa(QByteArray* ba);
QCborValue* QCborValue_FromCbor2(const char* data, size_t lenVal);
QCborValue* QCborValue_FromCbor3(const unsigned char* data, size_t lenVal);
QCborValue* QCborValue_FromCbor2(const char* data, ptrdiff_t lenVal);
QCborValue* QCborValue_FromCbor3(const unsigned char* data, ptrdiff_t lenVal);
QByteArray* QCborValue_ToCbor(QCborValue* self);
void QCborValue_ToCborWithWriter(QCborValue* self, QCborStreamWriter* writer);
struct miqt_string* QCborValue_ToDiagnosticNotation(const QCborValue* self);
@ -141,8 +141,8 @@ QUrl* QCborValue_ToUrl1(const QCborValue* self, QUrl* defaultValue);
QRegularExpression* QCborValue_ToRegularExpression1(const QCborValue* self, QRegularExpression* defaultValue);
QUuid* QCborValue_ToUuid1(const QCborValue* self, QUuid* defaultValue);
QCborValue* QCborValue_FromCbor22(QByteArray* ba, QCborParserError* error);
QCborValue* QCborValue_FromCbor32(const char* data, size_t lenVal, QCborParserError* error);
QCborValue* QCborValue_FromCbor33(const unsigned char* data, size_t lenVal, QCborParserError* error);
QCborValue* QCborValue_FromCbor32(const char* data, ptrdiff_t lenVal, QCborParserError* error);
QCborValue* QCborValue_FromCbor33(const unsigned char* data, ptrdiff_t lenVal, QCborParserError* error);
QByteArray* QCborValue_ToCbor1(QCborValue* self, int opt);
void QCborValue_ToCbor2(QCborValue* self, QCborStreamWriter* writer, int opt);
struct miqt_string* QCborValue_ToDiagnosticNotation1(const QCborValue* self, int opts);

View File

@ -378,7 +378,7 @@ func newQLatin1Char_U(h unsafe.Pointer) *QLatin1Char {
}
// NewQLatin1Char constructs a new QLatin1Char object.
func NewQLatin1Char(c byte) *QLatin1Char {
func NewQLatin1Char(c int8) *QLatin1Char {
ret := C.QLatin1Char_new((C.char)(c))
return newQLatin1Char(ret)
}
@ -389,8 +389,8 @@ func NewQLatin1Char2(param1 *QLatin1Char) *QLatin1Char {
return newQLatin1Char(ret)
}
func (this *QLatin1Char) ToLatin1() byte {
return (byte)(C.QLatin1Char_ToLatin1(this.h))
func (this *QLatin1Char) ToLatin1() int8 {
return (int8)(C.QLatin1Char_ToLatin1(this.h))
}
func (this *QLatin1Char) Unicode() uint16 {
@ -482,7 +482,7 @@ func NewQChar8(ch QLatin1Char) *QChar {
}
// NewQChar9 constructs a new QChar object.
func NewQChar9(c byte) *QChar {
func NewQChar9(c int8) *QChar {
ret := C.QChar_new9((C.char)(c))
return newQChar(ret)
}
@ -581,15 +581,15 @@ func (this *QChar) UnicodeVersion() QChar__UnicodeVersion {
return (QChar__UnicodeVersion)(C.QChar_UnicodeVersion(this.h))
}
func (this *QChar) ToLatin1() byte {
return (byte)(C.QChar_ToLatin1(this.h))
func (this *QChar) ToLatin1() int8 {
return (int8)(C.QChar_ToLatin1(this.h))
}
func (this *QChar) Unicode() uint16 {
return (uint16)(C.QChar_Unicode(this.h))
}
func QChar_FromLatin1(c byte) *QChar {
func QChar_FromLatin1(c int8) *QChar {
_ret := C.QChar_FromLatin1((C.char)(c))
_goptr := newQChar(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer

4
qt/gen_qcontainerfwd.cpp Normal file
View File

@ -0,0 +1,4 @@
#include "qcontainerfwd.h"
#include "gen_qcontainerfwd.h"
#include "_cgo_export.h"

9
qt/gen_qcontainerfwd.go Normal file
View File

@ -0,0 +1,9 @@
package qt
/*
#include "gen_qcontainerfwd.h"
#include <stdlib.h>
*/
import "C"

24
qt/gen_qcontainerfwd.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef GEN_QCONTAINERFWD_H
#define GEN_QCONTAINERFWD_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#include "binding.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
#else
#endif
#ifdef __cplusplus
} /* extern C */
#endif
#endif

View File

@ -172,7 +172,7 @@ func (this *QDataStream) SetVersion(version int) {
C.QDataStream_SetVersion(this.h, (C.int)(version))
}
func (this *QDataStream) OperatorShiftRight(i *byte) {
func (this *QDataStream) OperatorShiftRight(i *int8) {
C.QDataStream_OperatorShiftRight(this.h, (*C.schar)(unsafe.Pointer(i)))
}
@ -222,7 +222,7 @@ func (this *QDataStream) OperatorShiftRightWithStr(str string) {
C.QDataStream_OperatorShiftRightWithStr(this.h, str_Cstring)
}
func (this *QDataStream) OperatorShiftLeft(i byte) {
func (this *QDataStream) OperatorShiftLeft(i int8) {
C.QDataStream_OperatorShiftLeft(this.h, (C.schar)(i))
}

View File

@ -119,7 +119,7 @@ func (this *QDebug) OperatorShiftLeftWithBool(t bool) *QDebug {
return newQDebug_U(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithBool(this.h, (C.bool)(t))))
}
func (this *QDebug) OperatorShiftLeftWithChar(t byte) *QDebug {
func (this *QDebug) OperatorShiftLeftWithChar(t int8) *QDebug {
return newQDebug_U(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithChar(this.h, (C.char)(t))))
}
@ -183,7 +183,7 @@ func (this *QDebug) OperatorShiftLeftWithVoid(t unsafe.Pointer) *QDebug {
return newQDebug_U(unsafe.Pointer(C.QDebug_OperatorShiftLeftWithVoid(this.h, t)))
}
func (this *QDebug) MaybeQuote1(c byte) *QDebug {
func (this *QDebug) MaybeQuote1(c int8) *QDebug {
return newQDebug_U(unsafe.Pointer(C.QDebug_MaybeQuote1(this.h, (C.char)(c))))
}
@ -293,7 +293,7 @@ func (this *QNoDebug) Verbosity(param1 int) *QNoDebug {
return newQNoDebug_U(unsafe.Pointer(C.QNoDebug_Verbosity(this.h, (C.int)(param1))))
}
func (this *QNoDebug) MaybeQuote1(param1 byte) *QNoDebug {
func (this *QNoDebug) MaybeQuote1(param1 int8) *QNoDebug {
return newQNoDebug_U(unsafe.Pointer(C.QNoDebug_MaybeQuote1(this.h, (C.char)(param1))))
}

View File

@ -196,8 +196,9 @@ int QImage_ByteCount(const QImage* self) {
return self->byteCount();
}
size_t QImage_SizeInBytes(const QImage* self) {
return self->sizeInBytes();
ptrdiff_t QImage_SizeInBytes(const QImage* self) {
qsizetype _ret = self->sizeInBytes();
return static_cast<ptrdiff_t>(_ret);
}
unsigned char* QImage_ScanLine(QImage* self, int param1) {

View File

@ -295,8 +295,8 @@ func (this *QImage) ByteCount() int {
return (int)(C.QImage_ByteCount(this.h))
}
func (this *QImage) SizeInBytes() uint64 {
return (uint64)(C.QImage_SizeInBytes(this.h))
func (this *QImage) SizeInBytes() int64 {
return (int64)(C.QImage_SizeInBytes(this.h))
}
func (this *QImage) ScanLine(param1 int) *byte {

View File

@ -84,7 +84,7 @@ unsigned char* QImage_Bits(QImage* self);
const unsigned char* QImage_Bits2(const QImage* self);
const unsigned char* QImage_ConstBits(const QImage* self);
int QImage_ByteCount(const QImage* self);
size_t QImage_SizeInBytes(const QImage* self);
ptrdiff_t QImage_SizeInBytes(const QImage* self);
unsigned char* QImage_ScanLine(QImage* self, int param1);
const unsigned char* QImage_ScanLineWithInt(const QImage* self, int param1);
const unsigned char* QImage_ConstScanLine(const QImage* self, int param1);

View File

@ -262,11 +262,11 @@ func (this *QIODevice) WaitForBytesWritten(msecs int) bool {
return (bool)(C.QIODevice_WaitForBytesWritten(this.h, (C.int)(msecs)))
}
func (this *QIODevice) UngetChar(c byte) {
func (this *QIODevice) UngetChar(c int8) {
C.QIODevice_UngetChar(this.h, (C.char)(c))
}
func (this *QIODevice) PutChar(c byte) bool {
func (this *QIODevice) PutChar(c int8) bool {
return (bool)(C.QIODevice_PutChar(this.h, (C.char)(c)))
}

View File

@ -1746,28 +1746,28 @@ func (this *QLocale) ToDouble2(s string, ok *bool) float64 {
return (float64)(C.QLocale_ToDouble2(this.h, (*C.struct_miqt_string)(s_ms), (*C.bool)(unsafe.Pointer(ok))))
}
func (this *QLocale) ToString22(i float64, f byte) string {
func (this *QLocale) ToString22(i float64, f int8) string {
var _ms *C.struct_miqt_string = C.QLocale_ToString22(this.h, (C.double)(i), (C.char)(f))
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func (this *QLocale) ToString32(i float64, f byte, prec int) string {
func (this *QLocale) ToString32(i float64, f int8, prec int) string {
var _ms *C.struct_miqt_string = C.QLocale_ToString32(this.h, (C.double)(i), (C.char)(f), (C.int)(prec))
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func (this *QLocale) ToString23(i float32, f byte) string {
func (this *QLocale) ToString23(i float32, f int8) string {
var _ms *C.struct_miqt_string = C.QLocale_ToString23(this.h, (C.float)(i), (C.char)(f))
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))
return _ret
}
func (this *QLocale) ToString33(i float32, f byte, prec int) string {
func (this *QLocale) ToString33(i float32, f int8, prec int) string {
var _ms *C.struct_miqt_string = C.QLocale_ToString33(this.h, (C.float)(i), (C.char)(f), (C.int)(prec))
_ret := C.GoStringN(&_ms.data, C.int(int64(_ms.len)))
C.free(unsafe.Pointer(_ms))

View File

@ -8,8 +8,8 @@ QRandomGenerator* QRandomGenerator_new() {
return new QRandomGenerator();
}
QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, size_t lenVal) {
return new QRandomGenerator(static_cast<const quint32*>(seedBuffer), static_cast<qsizetype>(lenVal));
QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) {
return new QRandomGenerator(static_cast<const quint32*>(seedBuffer), (qsizetype)(lenVal));
}
QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end) {
@ -115,8 +115,8 @@ QRandomGenerator64* QRandomGenerator64_new() {
return new QRandomGenerator64();
}
QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, size_t lenVal) {
return new QRandomGenerator64(static_cast<const quint32*>(seedBuffer), static_cast<qsizetype>(lenVal));
QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) {
return new QRandomGenerator64(static_cast<const quint32*>(seedBuffer), (qsizetype)(lenVal));
}
QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end) {

View File

@ -42,8 +42,8 @@ func NewQRandomGenerator() *QRandomGenerator {
}
// NewQRandomGenerator2 constructs a new QRandomGenerator object.
func NewQRandomGenerator2(seedBuffer *uint, lenVal uint64) *QRandomGenerator {
ret := C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.size_t)(lenVal))
func NewQRandomGenerator2(seedBuffer *uint, lenVal int64) *QRandomGenerator {
ret := C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal))
return newQRandomGenerator(ret)
}
@ -188,8 +188,8 @@ func NewQRandomGenerator64() *QRandomGenerator64 {
}
// NewQRandomGenerator642 constructs a new QRandomGenerator64 object.
func NewQRandomGenerator642(seedBuffer *uint, lenVal uint64) *QRandomGenerator64 {
ret := C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.size_t)(lenVal))
func NewQRandomGenerator642(seedBuffer *uint, lenVal int64) *QRandomGenerator64 {
ret := C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal))
return newQRandomGenerator64(ret)
}

View File

@ -22,7 +22,7 @@ typedef struct QRandomGenerator64 QRandomGenerator64;
#endif
QRandomGenerator* QRandomGenerator_new();
QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, size_t lenVal);
QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal);
QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end);
QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other);
QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue);
@ -48,7 +48,7 @@ void QRandomGenerator_Seed1(QRandomGenerator* self, unsigned int s);
void QRandomGenerator_Delete(QRandomGenerator* self);
QRandomGenerator64* QRandomGenerator64_new();
QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, size_t lenVal);
QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal);
QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end);
QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other);
QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1);

View File

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

View File

@ -193,7 +193,7 @@ func NewQSocketDescriptor2(param1 *QSocketDescriptor) *QSocketDescriptor {
}
// NewQSocketDescriptor3 constructs a new QSocketDescriptor object.
func NewQSocketDescriptor3(descriptor QSocketNotifier__Type) *QSocketDescriptor {
func NewQSocketDescriptor3(descriptor int) *QSocketDescriptor {
if runtime.GOOS == "linux" {
ret := C.QSocketDescriptor_new3((C.int)(descriptor))
return newQSocketDescriptor(ret)

View File

@ -20,8 +20,9 @@ struct miqt_string* QStringView_ToString(const QStringView* self) {
return miqt_strdup(_b.data(), _b.length());
}
size_t QStringView_Size(const QStringView* self) {
return self->size();
ptrdiff_t QStringView_Size(const QStringView* self) {
qsizetype _ret = self->size();
return static_cast<ptrdiff_t>(_ret);
}
QChar* QStringView_Data(const QStringView* self) {
@ -29,8 +30,8 @@ QChar* QStringView_Data(const QStringView* self) {
return const_cast<QChar*>(static_cast<const QChar*>(_ret));
}
QChar* QStringView_OperatorSubscript(const QStringView* self, size_t n) {
return new QChar(self->operator[](static_cast<qsizetype>(n)));
QChar* QStringView_OperatorSubscript(const QStringView* self, ptrdiff_t n) {
return new QChar(self->operator[]((qsizetype)(n)));
}
QByteArray* QStringView_ToLatin1(const QStringView* self) {
@ -58,16 +59,16 @@ struct miqt_array* QStringView_ToUcs4(const QStringView* self) {
return _out;
}
QChar* QStringView_At(const QStringView* self, size_t n) {
return new QChar(self->at(static_cast<qsizetype>(n)));
QChar* QStringView_At(const QStringView* self, ptrdiff_t n) {
return new QChar(self->at((qsizetype)(n)));
}
void QStringView_Truncate(QStringView* self, size_t n) {
self->truncate(static_cast<qsizetype>(n));
void QStringView_Truncate(QStringView* self, ptrdiff_t n) {
self->truncate((qsizetype)(n));
}
void QStringView_Chop(QStringView* self, size_t n) {
self->chop(static_cast<qsizetype>(n));
void QStringView_Chop(QStringView* self, ptrdiff_t n) {
self->chop((qsizetype)(n));
}
int QStringView_CompareWithQChar(const QStringView* self, QChar* c) {
@ -94,20 +95,23 @@ bool QStringView_EndsWith2(const QStringView* self, QChar* c, int cs) {
return self->endsWith(*c, static_cast<Qt::CaseSensitivity>(cs));
}
size_t QStringView_IndexOf(const QStringView* self, QChar* c) {
return self->indexOf(*c);
ptrdiff_t QStringView_IndexOf(const QStringView* self, QChar* c) {
qsizetype _ret = self->indexOf(*c);
return static_cast<ptrdiff_t>(_ret);
}
bool QStringView_Contains(const QStringView* self, QChar* c) {
return self->contains(*c);
}
size_t QStringView_Count(const QStringView* self, QChar* c) {
return self->count(*c);
ptrdiff_t QStringView_Count(const QStringView* self, QChar* c) {
qsizetype _ret = self->count(*c);
return static_cast<ptrdiff_t>(_ret);
}
size_t QStringView_LastIndexOf(const QStringView* self, QChar* c) {
return self->lastIndexOf(*c);
ptrdiff_t QStringView_LastIndexOf(const QStringView* self, QChar* c) {
qsizetype _ret = self->lastIndexOf(*c);
return static_cast<ptrdiff_t>(_ret);
}
bool QStringView_IsRightToLeft(const QStringView* self) {
@ -215,28 +219,33 @@ QChar* QStringView_Last(const QStringView* self) {
return new QChar(self->last());
}
size_t QStringView_IndexOf2(const QStringView* self, QChar* c, size_t from) {
return self->indexOf(*c, static_cast<qsizetype>(from));
ptrdiff_t QStringView_IndexOf2(const QStringView* self, QChar* c, ptrdiff_t from) {
qsizetype _ret = self->indexOf(*c, (qsizetype)(from));
return static_cast<ptrdiff_t>(_ret);
}
size_t QStringView_IndexOf3(const QStringView* self, QChar* c, size_t from, int cs) {
return self->indexOf(*c, static_cast<qsizetype>(from), static_cast<Qt::CaseSensitivity>(cs));
ptrdiff_t QStringView_IndexOf3(const QStringView* self, QChar* c, ptrdiff_t from, int cs) {
qsizetype _ret = self->indexOf(*c, (qsizetype)(from), static_cast<Qt::CaseSensitivity>(cs));
return static_cast<ptrdiff_t>(_ret);
}
bool QStringView_Contains2(const QStringView* self, QChar* c, int cs) {
return self->contains(*c, static_cast<Qt::CaseSensitivity>(cs));
}
size_t QStringView_Count2(const QStringView* self, QChar* c, int cs) {
return self->count(*c, static_cast<Qt::CaseSensitivity>(cs));
ptrdiff_t QStringView_Count2(const QStringView* self, QChar* c, int cs) {
qsizetype _ret = self->count(*c, static_cast<Qt::CaseSensitivity>(cs));
return static_cast<ptrdiff_t>(_ret);
}
size_t QStringView_LastIndexOf2(const QStringView* self, QChar* c, size_t from) {
return self->lastIndexOf(*c, static_cast<qsizetype>(from));
ptrdiff_t QStringView_LastIndexOf2(const QStringView* self, QChar* c, ptrdiff_t from) {
qsizetype _ret = self->lastIndexOf(*c, (qsizetype)(from));
return static_cast<ptrdiff_t>(_ret);
}
size_t QStringView_LastIndexOf3(const QStringView* self, QChar* c, size_t from, int cs) {
return self->lastIndexOf(*c, static_cast<qsizetype>(from), static_cast<Qt::CaseSensitivity>(cs));
ptrdiff_t QStringView_LastIndexOf3(const QStringView* self, QChar* c, ptrdiff_t from, int cs) {
qsizetype _ret = self->lastIndexOf(*c, (qsizetype)(from), static_cast<Qt::CaseSensitivity>(cs));
return static_cast<ptrdiff_t>(_ret);
}
int16_t QStringView_ToShort1(const QStringView* self, bool* ok) {

View File

@ -48,16 +48,16 @@ func (this *QStringView) ToString() string {
return _ret
}
func (this *QStringView) Size() uint64 {
return (uint64)(C.QStringView_Size(this.h))
func (this *QStringView) Size() int64 {
return (int64)(C.QStringView_Size(this.h))
}
func (this *QStringView) Data() *QChar {
return newQChar_U(unsafe.Pointer(C.QStringView_Data(this.h)))
}
func (this *QStringView) OperatorSubscript(n uint64) *QChar {
_ret := C.QStringView_OperatorSubscript(this.h, (C.size_t)(n))
func (this *QStringView) OperatorSubscript(n int64) *QChar {
_ret := C.QStringView_OperatorSubscript(this.h, (C.ptrdiff_t)(n))
_goptr := newQChar(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
@ -95,19 +95,19 @@ func (this *QStringView) ToUcs4() []uint {
return _ret
}
func (this *QStringView) At(n uint64) *QChar {
_ret := C.QStringView_At(this.h, (C.size_t)(n))
func (this *QStringView) At(n int64) *QChar {
_ret := C.QStringView_At(this.h, (C.ptrdiff_t)(n))
_goptr := newQChar(_ret)
_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer
return _goptr
}
func (this *QStringView) Truncate(n uint64) {
C.QStringView_Truncate(this.h, (C.size_t)(n))
func (this *QStringView) Truncate(n int64) {
C.QStringView_Truncate(this.h, (C.ptrdiff_t)(n))
}
func (this *QStringView) Chop(n uint64) {
C.QStringView_Chop(this.h, (C.size_t)(n))
func (this *QStringView) Chop(n int64) {
C.QStringView_Chop(this.h, (C.ptrdiff_t)(n))
}
func (this *QStringView) CompareWithQChar(c QChar) int {
@ -134,20 +134,20 @@ func (this *QStringView) EndsWith2(c QChar, cs CaseSensitivity) bool {
return (bool)(C.QStringView_EndsWith2(this.h, c.cPointer(), (C.int)(cs)))
}
func (this *QStringView) IndexOf(c QChar) uint64 {
return (uint64)(C.QStringView_IndexOf(this.h, c.cPointer()))
func (this *QStringView) IndexOf(c QChar) int64 {
return (int64)(C.QStringView_IndexOf(this.h, c.cPointer()))
}
func (this *QStringView) Contains(c QChar) bool {
return (bool)(C.QStringView_Contains(this.h, c.cPointer()))
}
func (this *QStringView) Count(c QChar) uint64 {
return (uint64)(C.QStringView_Count(this.h, c.cPointer()))
func (this *QStringView) Count(c QChar) int64 {
return (int64)(C.QStringView_Count(this.h, c.cPointer()))
}
func (this *QStringView) LastIndexOf(c QChar) uint64 {
return (uint64)(C.QStringView_LastIndexOf(this.h, c.cPointer()))
func (this *QStringView) LastIndexOf(c QChar) int64 {
return (int64)(C.QStringView_LastIndexOf(this.h, c.cPointer()))
}
func (this *QStringView) IsRightToLeft() bool {
@ -258,28 +258,28 @@ func (this *QStringView) Last() *QChar {
return _goptr
}
func (this *QStringView) IndexOf2(c QChar, from uint64) uint64 {
return (uint64)(C.QStringView_IndexOf2(this.h, c.cPointer(), (C.size_t)(from)))
func (this *QStringView) IndexOf2(c QChar, from int64) int64 {
return (int64)(C.QStringView_IndexOf2(this.h, c.cPointer(), (C.ptrdiff_t)(from)))
}
func (this *QStringView) IndexOf3(c QChar, from uint64, cs CaseSensitivity) uint64 {
return (uint64)(C.QStringView_IndexOf3(this.h, c.cPointer(), (C.size_t)(from), (C.int)(cs)))
func (this *QStringView) IndexOf3(c QChar, from int64, cs CaseSensitivity) int64 {
return (int64)(C.QStringView_IndexOf3(this.h, c.cPointer(), (C.ptrdiff_t)(from), (C.int)(cs)))
}
func (this *QStringView) Contains2(c QChar, cs CaseSensitivity) bool {
return (bool)(C.QStringView_Contains2(this.h, c.cPointer(), (C.int)(cs)))
}
func (this *QStringView) Count2(c QChar, cs CaseSensitivity) uint64 {
return (uint64)(C.QStringView_Count2(this.h, c.cPointer(), (C.int)(cs)))
func (this *QStringView) Count2(c QChar, cs CaseSensitivity) int64 {
return (int64)(C.QStringView_Count2(this.h, c.cPointer(), (C.int)(cs)))
}
func (this *QStringView) LastIndexOf2(c QChar, from uint64) uint64 {
return (uint64)(C.QStringView_LastIndexOf2(this.h, c.cPointer(), (C.size_t)(from)))
func (this *QStringView) LastIndexOf2(c QChar, from int64) int64 {
return (int64)(C.QStringView_LastIndexOf2(this.h, c.cPointer(), (C.ptrdiff_t)(from)))
}
func (this *QStringView) LastIndexOf3(c QChar, from uint64, cs CaseSensitivity) uint64 {
return (uint64)(C.QStringView_LastIndexOf3(this.h, c.cPointer(), (C.size_t)(from), (C.int)(cs)))
func (this *QStringView) LastIndexOf3(c QChar, from int64, cs CaseSensitivity) int64 {
return (int64)(C.QStringView_LastIndexOf3(this.h, c.cPointer(), (C.ptrdiff_t)(from), (C.int)(cs)))
}
func (this *QStringView) ToShort1(ok *bool) int16 {

View File

@ -25,26 +25,26 @@ typedef struct QStringView QStringView;
QStringView* QStringView_new();
struct miqt_string* QStringView_ToString(const QStringView* self);
size_t QStringView_Size(const QStringView* self);
ptrdiff_t QStringView_Size(const QStringView* self);
QChar* QStringView_Data(const QStringView* self);
QChar* QStringView_OperatorSubscript(const QStringView* self, size_t n);
QChar* QStringView_OperatorSubscript(const QStringView* self, ptrdiff_t n);
QByteArray* QStringView_ToLatin1(const QStringView* self);
QByteArray* QStringView_ToUtf8(const QStringView* self);
QByteArray* QStringView_ToLocal8Bit(const QStringView* self);
struct miqt_array* QStringView_ToUcs4(const QStringView* self);
QChar* QStringView_At(const QStringView* self, size_t n);
void QStringView_Truncate(QStringView* self, size_t n);
void QStringView_Chop(QStringView* self, size_t n);
QChar* QStringView_At(const QStringView* self, ptrdiff_t n);
void QStringView_Truncate(QStringView* self, ptrdiff_t n);
void QStringView_Chop(QStringView* self, ptrdiff_t n);
int QStringView_CompareWithQChar(const QStringView* self, QChar* c);
int QStringView_Compare2(const QStringView* self, QChar* c, int cs);
bool QStringView_StartsWithWithQChar(const QStringView* self, QChar* c);
bool QStringView_StartsWith2(const QStringView* self, QChar* c, int cs);
bool QStringView_EndsWithWithQChar(const QStringView* self, QChar* c);
bool QStringView_EndsWith2(const QStringView* self, QChar* c, int cs);
size_t QStringView_IndexOf(const QStringView* self, QChar* c);
ptrdiff_t QStringView_IndexOf(const QStringView* self, QChar* c);
bool QStringView_Contains(const QStringView* self, QChar* c);
size_t QStringView_Count(const QStringView* self, QChar* c);
size_t QStringView_LastIndexOf(const QStringView* self, QChar* c);
ptrdiff_t QStringView_Count(const QStringView* self, QChar* c);
ptrdiff_t QStringView_LastIndexOf(const QStringView* self, QChar* c);
bool QStringView_IsRightToLeft(const QStringView* self);
bool QStringView_IsValidUtf16(const QStringView* self);
int16_t QStringView_ToShort(const QStringView* self);
@ -69,12 +69,12 @@ bool QStringView_IsEmpty(const QStringView* self);
int QStringView_Length(const QStringView* self);
QChar* QStringView_First(const QStringView* self);
QChar* QStringView_Last(const QStringView* self);
size_t QStringView_IndexOf2(const QStringView* self, QChar* c, size_t from);
size_t QStringView_IndexOf3(const QStringView* self, QChar* c, size_t from, int cs);
ptrdiff_t QStringView_IndexOf2(const QStringView* self, QChar* c, ptrdiff_t from);
ptrdiff_t QStringView_IndexOf3(const QStringView* self, QChar* c, ptrdiff_t from, int cs);
bool QStringView_Contains2(const QStringView* self, QChar* c, int cs);
size_t QStringView_Count2(const QStringView* self, QChar* c, int cs);
size_t QStringView_LastIndexOf2(const QStringView* self, QChar* c, size_t from);
size_t QStringView_LastIndexOf3(const QStringView* self, QChar* c, size_t from, int cs);
ptrdiff_t QStringView_Count2(const QStringView* self, QChar* c, int cs);
ptrdiff_t QStringView_LastIndexOf2(const QStringView* self, QChar* c, ptrdiff_t from);
ptrdiff_t QStringView_LastIndexOf3(const QStringView* self, QChar* c, ptrdiff_t from, int cs);
int16_t QStringView_ToShort1(const QStringView* self, bool* ok);
int16_t QStringView_ToShort2(const QStringView* self, bool* ok, int base);
uint16_t QStringView_ToUShort1(const QStringView* self, bool* ok);

View File

@ -283,7 +283,7 @@ func (this *QTextStream) OperatorShiftRight(ch *QChar) *QTextStream {
return newQTextStream_U(unsafe.Pointer(C.QTextStream_OperatorShiftRight(this.h, ch.cPointer())))
}
func (this *QTextStream) OperatorShiftRightWithCh(ch *byte) *QTextStream {
func (this *QTextStream) OperatorShiftRightWithCh(ch *int8) *QTextStream {
return newQTextStream_U(unsafe.Pointer(C.QTextStream_OperatorShiftRightWithCh(this.h, (*C.char)(unsafe.Pointer(ch)))))
}
@ -347,7 +347,7 @@ func (this *QTextStream) OperatorShiftLeft(ch QChar) *QTextStream {
return newQTextStream_U(unsafe.Pointer(C.QTextStream_OperatorShiftLeft(this.h, ch.cPointer())))
}
func (this *QTextStream) OperatorShiftLeftWithCh(ch byte) *QTextStream {
func (this *QTextStream) OperatorShiftLeftWithCh(ch int8) *QTextStream {
return newQTextStream_U(unsafe.Pointer(C.QTextStream_OperatorShiftLeftWithCh(this.h, (C.char)(ch))))
}