From 1e782f0d1cd9e6fbb84425670d0e2f4444e20b17 Mon Sep 17 00:00:00 2001 From: Uwe Siems Date: Fri, 9 Jan 2026 18:18:42 +0100 Subject: [PATCH 1/2] I turns out that the syncqt tool does not create a correct hex version parse the string version instead --- generator/main.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/generator/main.cpp b/generator/main.cpp index 251e41043..945d6b289 100644 --- a/generator/main.cpp +++ b/generator/main.cpp @@ -307,7 +307,8 @@ bool preprocess(const QString& sourceFile, const QString& targetFile, const QStr unsigned int getQtVersion(const QStringList& paths) { - QRegularExpression re("#define\\s+QTCORE_VERSION\\s+0x([0-9a-f]+)", QRegularExpression::CaseInsensitiveOption); + QRegularExpression re(R"*(#define\s+QTCORE_VERSION_STR\s+"(\d+)\.(\d+)\.(\d+)")*", + QRegularExpression::CaseInsensitiveOption); // Iterate through provided paths to find the qtcoreversion.h header file for (const QString& path : paths) { @@ -340,14 +341,7 @@ unsigned int getQtVersion(const QStringList& paths) f.close(); auto match = re.match(content); if (match.isValid()) { - unsigned int result; - bool ok; - result = match.captured(1).toUInt(&ok, 16); - if (!ok) { - printf("Could not parse Qt version in file [%s] (looked for #define QTCORE_VERSION)\n", - qPrintable(filePath)); - } - return result; + return (match.captured(1).toUInt() << 16) + (match.captured(2).toUInt() << 8) + match.captured(3).toUInt(); } } } From 73c9ca44773e5310a709ea0c4c46b7c6b12ab95d Mon Sep 17 00:00:00 2001 From: Uwe Siems Date: Fri, 9 Jan 2026 18:29:50 +0100 Subject: [PATCH 2/2] Minor generation fixes for Qt 6.10 --- generator/typesystem_core.xml | 20 +++++++++++++++++++- generator/typesystem_multimedia.xml | 11 ++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/generator/typesystem_core.xml b/generator/typesystem_core.xml index e14f8d50f..46d1b8508 100644 --- a/generator/typesystem_core.xml +++ b/generator/typesystem_core.xml @@ -2181,7 +2181,25 @@ public: - + + + + void py_set_offset(QJsonParseError* theWrappedObject, int offset){ + theWrappedObject->offset = offset; + } + int py_get_offset(QJsonParseError* theWrappedObject){ + return theWrappedObject->offset; + } + + + void py_set_offset(QJsonParseError* theWrappedObject, qint64 offset){ + theWrappedObject->offset = offset; + } + qint64 py_get_offset(QJsonParseError* theWrappedObject){ + return theWrappedObject->offset; + } + + diff --git a/generator/typesystem_multimedia.xml b/generator/typesystem_multimedia.xml index b2c326978..26cb9c246 100644 --- a/generator/typesystem_multimedia.xml +++ b/generator/typesystem_multimedia.xml @@ -87,7 +87,15 @@ - + + + + float static_QAudio_convertVolume(float volume, QAudio::VolumeScale from, QAudio::VolumeScale to) + { + return (QtAudio::convertVolume(volume, from, to)); + } + + @@ -226,6 +234,7 @@ +