Skip to content

Commit 04e2c1b

Browse files
committed
Add default and copy constructor for QFontInfo and QFontMetrics
These are needed when these types are returned by value (as for example from QWidget)
1 parent b6bc063 commit 04e2c1b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

generator/typesystem_gui.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,11 @@
906906

907907
<value-type name="QFontInfo" expense-cost="1" expense-limit="1000">
908908
<modify-function signature="operator=(QFontInfo)" remove="all"/>
909+
910+
<inject-code class="pywrap-h">
911+
QFontInfo* new_QFontInfo() { return new QFontInfo(QFont()); }
912+
</inject-code>
913+
909914
</value-type>
910915

911916
<value-type name="QRadialGradient" polymorphic-id-expression="%1-&gt;type() == QGradient::RadialGradient">
@@ -1128,7 +1133,11 @@ PyObject* constScanLine(QImage* image, int line) {
11281133

11291134
<modify-function signature="operator=(QFontMetrics)" remove="all"/>
11301135

1131-
<modify-function signature="QFontMetrics(QFontMetrics)" remove="all"/>
1136+
<inject-code class="pywrap-h">
1137+
QFontMetrics* new_QFontMetrics() { return new QFontMetrics(QFont()); }
1138+
</inject-code>
1139+
1140+
<!-- <modify-function signature="QFontMetrics(QFontMetrics)" remove="all"/> -->
11321141
<modify-function signature="operator==(QFontMetrics)const" remove="all"/>
11331142
<modify-function signature="operator!=(QFontMetrics)const" remove="all"/>
11341143
</value-type>

0 commit comments

Comments
 (0)