Skip to content

Commit f63bee1

Browse files
committed
Minor generation fixes for Qt 6.10
1 parent 21643e7 commit f63bee1

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

generator/typesystem_core.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,25 @@ public:
21812181
<object-type name="QJsonArray"/>
21822182
<object-type name="QJsonDocument"/>
21832183
<object-type name="QJsonObject"/>
2184-
<object-type name="QJsonParseError"/>
2184+
<object-type name="QJsonParseError">
2185+
<!-- generator can't handle std::conditional_t introduced with Qt 6.10 -->
2186+
<inject-code class="pywrap-h" since-version="6.10" before-version="7">
2187+
void py_set_offset(QJsonParseError* theWrappedObject, int offset){
2188+
theWrappedObject->offset = offset;
2189+
}
2190+
int py_get_offset(QJsonParseError* theWrappedObject){
2191+
return theWrappedObject->offset;
2192+
}
2193+
</inject-code>
2194+
<inject-code class="pywrap-h" since-version="7">
2195+
void py_set_offset(QJsonParseError* theWrappedObject, qint64 offset){
2196+
theWrappedObject->offset = offset;
2197+
}
2198+
qint64 py_get_offset(QJsonParseError* theWrappedObject){
2199+
return theWrappedObject->offset;
2200+
}
2201+
</inject-code>
2202+
</object-type>
21852203
<object-type name="QJsonValue">
21862204
<!-- workaround to handle using declaration for an enum in another class -->
21872205
<!-- (currently not handled by the generator, handling needs to be added if this happens more often) -->

generator/typesystem_multimedia.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,15 @@
8787
<enum-type name="QMediaServiceProviderHint::Type"/>
8888
<enum-type name="QMediaStreamsControl::StreamType"/>
8989

90-
<namespace-type name="QAudio"/>
90+
<namespace-type name="QAudio">
91+
<!-- QAudio::convertVolume will be in QtAudio with Qt 7 -->
92+
<inject-code class="pywrap-h" since-version="6.10">
93+
float static_QAudio_convertVolume(float volume, QAudio::VolumeScale from, QAudio::VolumeScale to)
94+
{
95+
return (QtAudio::convertVolume(volume, from, to));
96+
}
97+
</inject-code>
98+
</namespace-type>
9199
<namespace-type name="QMultimedia" since-version="5"/>
92100

93101
<object-type name="QAbstractVideoBuffer" before-version="6"/>
@@ -226,6 +234,7 @@
226234
<object-type name="QAudioBufferOutput" since-version="6.8"/>
227235
<object-type name="QVideoFrameInput" since-version="6.8"/>
228236
<object-type name="QVideoFrameInput" since-version="6.8"/>
237+
<object-type name="QPlaybackOptions" since-version="6.10"/>
229238
</group>
230239

231240
</typesystem>

0 commit comments

Comments
 (0)