Skip to content

Commit f261c2e

Browse files
author
Ece Cinucen
committed
type-hints: Correct QMessagebox annotations
parent parameter of about, aboutQt, critical, information, question, and warning changed to Optional[QWidget]. Fixes: PYSIDE-3021 Pick-to: 6.8 6.9 Change-Id: I31e556933f25f6c21e18debb274db6a13ffbe2ed Reviewed-by: Christian Tismer <[email protected]>
1 parent 451a0f7 commit f261c2e

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

sources/pyside6/PySide6/QtWidgets/typesystem_widgets_common.xml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,18 +2317,34 @@
23172317
snippet="qmessagebox-open-connect-accept"/>
23182318
</add-function>
23192319
<!-- FIXME PYSIDE-7: Remove deprecated overloads -->
2320-
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
2320+
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes">
2321+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2322+
</modify-function>
23212323
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
2322-
allow-thread="yes"/>
2323-
<modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
2324+
allow-thread="yes">
2325+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2326+
</modify-function>
2327+
<modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes">
2328+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2329+
</modify-function>
23242330
<modify-function signature="information(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
2325-
allow-thread="yes"/>
2326-
<modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
2331+
allow-thread="yes">
2332+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2333+
</modify-function>
2334+
<modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes">
2335+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2336+
</modify-function>
23272337
<modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
2328-
allow-thread="yes"/>
2329-
<modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes"/>
2338+
allow-thread="yes">
2339+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2340+
</modify-function>
2341+
<modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QFlags&lt;QMessageBox::StandardButton&gt;,QMessageBox::StandardButton)" allow-thread="yes">
2342+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2343+
</modify-function>
23302344
<modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,QMessageBox::StandardButton,QMessageBox::StandardButton)"
2331-
allow-thread="yes"/>
2345+
allow-thread="yes">
2346+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2347+
</modify-function>
23322348
<modify-function signature="QMessageBox(const QString&amp;,const QString&amp;,QMessageBox::Icon,int,int,int,QWidget*,QFlags&lt;Qt::WindowType&gt;)" remove="all"/>
23332349
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
23342350
<modify-function signature="critical(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
@@ -2338,8 +2354,12 @@
23382354
<modify-function signature="question(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
23392355
<modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,int,int,int)" remove="all"/>
23402356
<modify-function signature="warning(QWidget*,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,const QString&amp;,int,int)" remove="all"/>
2341-
<modify-function signature="about(QWidget*,const QString&amp;,const QString&amp;)" allow-thread="yes"/>
2342-
<modify-function signature="aboutQt(QWidget*,const QString&amp;)" allow-thread="yes"/>
2357+
<modify-function signature="about(QWidget*,const QString&amp;,const QString&amp;)" allow-thread="yes">
2358+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2359+
</modify-function>
2360+
<modify-function signature="aboutQt(QWidget*,const QString&amp;)" allow-thread="yes">
2361+
<modify-argument index="1" pyi-type="Optional[PySide6.QtWidgets.QWidget]"/>
2362+
</modify-function>
23432363
</object-type>
23442364
<object-type name="QAbstractSpinBox">
23452365
<enum-type name="ButtonSymbols"/>

0 commit comments

Comments
 (0)