Details
Description
Despite help(QtCore.QLocale().toLong) reads that the function returns tuple[int, bool], the function actually returns a single int value. The docs confuse more than help.
On the other hand, QtCore.QLocale().toInt returns a tuple, in accordance with the help.
So, the MWE is the following:
from PySide6 import QtCore # or from PySide2 print(QtCore.QLocale().toLong('42'))
The expected output is (42, True), however the actual one is just 42.
The same refers to QtCore.QLocale().toULong, but not to any other to-number function of the family.
Attachments
For Gerrit Dashboard: PYSIDE-2226 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
493787,5 | Fix QLocale.toLong return value | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |