aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-08-10 15:57:07 +0200
committerChristian Tismer <tismer@stackless.com>2021-08-10 22:39:47 +0200
commitf7b23933a737503ba23bf4c98133ea1e578806a2 (patch)
tree83f53792625685bff2c468302d4cc01533492be0 /sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
parentf417d1b85d8f2bd499f18091994baab126dacc66 (diff)
ApiExtractor: add classmethod attribute to add-function for tr()
++ This change was forgotten to port to 6.1 . It is needed for ++ feature: move getFeatureSelectId to Shiboken and refactor [ChangeLog][PySide6] The tr() translation method of QObject has been changed to be a class method. This makes it possible to use tr() on a class without instantiation. The tr() method of QObject should be a class method. - Build class method support into apiextraktor. - Use the new functionality in the tr() method. Listing of tr() in QtCore.pyi will be solved in an extra check-in. Task-number: PYSIDE-131 Task-number: PYSIDE-1252 Change-Id: If5093e038c091bf8c4d2a940fe206f6caa99568e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/QtCore/typesystem_core_common.xml')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml12
1 files changed, 4 insertions, 8 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index 4ee667ae6..e74fd8130 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -1730,15 +1730,11 @@
</modify-argument>
</add-function>
- <add-function signature="tr(const char*,const char*,int)" return-type="QString">
- <modify-argument index="2">
- <replace-default-expression with="0"/>
- </modify-argument>
- <modify-argument index="3">
- <replace-default-expression with="-1"/>
- </modify-argument>
-
+ <add-function signature="tr(const char *@sourceText@, const char *@disambiguation@=nullptr, int @n@=-1)" return-type="QString" classmethod="yes">
<inject-code class="target" position="beginning" file="../glue/qtcore.cpp" snippet="qobject-tr"/>
+ <modify-argument index="1" pyi-type="str"/>
+ <modify-argument index="2" pyi-type="Optional[str]">
+ </modify-argument>
</add-function>
<modify-function signature="receivers(const char*)const">