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(); } } } 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 @@ +