aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2023-08-01 18:35:28 +0200
committerCristian Maureira-Fredes <cristian.maureira-fredes@qt.io>2023-08-15 08:16:12 +0000
commit54898f87b56b31dacc6bda8ff8c6d98f9cc0c26d (patch)
treec589806e119b96396bd2700be84ae16c224a590f /sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
parent078fb526b34d980d26af2f73b5ddf4499e889b59 (diff)
Fix QLocale.toLong return value
The currently implementation was using an inherited toLong function, not returning the Tuple[int, bool] that the docs described. This adds a modification to follow the same idea of all the other to*() methods. Additionally, we remove all the to*() methods that accept a QStringView, due to behaving the same with the QString variations. [ChangeLog][pyside6] QLocale.toLong now properly returns a (int, bool) rather than only int Fixes: PYSIDE-2226 Change-Id: I5634e4010982e115c8208fdb9b56cfc57960358b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Tismer <tismer@stackless.com>
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, 12 insertions, 0 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index ac8b0752e..c801aef3f 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -1416,6 +1416,17 @@
<insert-template name="fix_args,bool*"/>
</inject-code>
</modify-function>
+ <modify-function signature="toLong(QString,bool*)const">
+ <modify-argument index="2">
+ <remove-argument />
+ </modify-argument>
+ <modify-argument index="return" pyi-type="Tuple[int, bool]">
+ <replace-type modified-type="(int, bool ok)"/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_args,bool*"/>
+ </inject-code>
+ </modify-function>
<modify-function signature="toShort(QString,bool*)const">
<modify-argument index="2">
<remove-argument />
@@ -1442,6 +1453,7 @@
ensure float overloads are used -->
<modify-function signature="^to(Currency)?String\(q?u.*$" remove="all"/>
<modify-function signature="^to(Currency)?String\(.*short.*$" remove="all"/>
+ <modify-function signature="^to.*\(.*QStringView.*$" remove="all"/>
</value-type>
<value-type name="QBitArray">
<add-function signature="__len__">