From 25e10f2824b0830d00b64741443f0192ed49277d Mon Sep 17 00:00:00 2001 From: mappu Date: Tue, 26 Nov 2024 19:52:29 +1300 Subject: [PATCH] genbindings/cabi: QFlags<>& use C-style cast --- cmd/genbindings/emitcabi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/genbindings/emitcabi.go b/cmd/genbindings/emitcabi.go index 663d7886..7b051134 100644 --- a/cmd/genbindings/emitcabi.go +++ b/cmd/genbindings/emitcabi.go @@ -299,7 +299,8 @@ func emitCABI2CppForwarding(p CppParameter, indent string) (preamble string, for 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" { + p.ParameterType == "qint8" || + (p.IsFlagType() && p.ByRef) { // QDataStream::operator>>() by reference (qint64) // QLockFile::getLockInfo() by pointer // QTextStream::operator>>() by reference (qlonglong + qulonglong)