Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.3.0
-
None
Description
When (I believe) the qDebug() output of something contains a dot, this results in an odd repr:
>>> from PySide6.QtCore import QVersionNumber
>>> QVersionNumber(1, 5, 0)
<1.5.0 at 0x7f55fc334080>
while I would have expected something like <QVersionNumber 1.5.0 at ...> or so.
I believe this is due to the implementation of writeReprFunction in Shiboken:
// PYSIDE-595: The introduction of heap types has the side effect that the module name // is always prepended to the type name. Therefore the strchr check: s << "if (mod && !strchr(str, '.'))\n"; { Indentation indent(s); s << "return Shiboken::String::fromFormat(\"<%s.%s at %p>\", Shiboken::String::toCString(mod), str.constData(), self);\n"; } s << "else\n"; { Indentation indent(s); s << "return Shiboken::String::fromFormat(\"<%s at %p>\", str.constData(), self);\n"; }
see PYSIDE-595.