diff options
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetatype.cpp | 12 | ||||
-rw-r--r-- | sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py | 12 |
2 files changed, 2 insertions, 22 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp index d47b25ef2..b5fa4100c 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetatype.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetatype.cpp @@ -668,16 +668,8 @@ QString AbstractMetaTypeData::formatPythonSignature() const result += TypeInfo::indirectionKeyword(i); // If it is a flags type, we replace it with the full name: // "PySide6.QtCore.Qt.ItemFlags" instead of "PySide6.QtCore.QFlags<Qt.ItemFlag>" - if (m_typeEntry->isFlags()) { - // PYSIDE-1735: We need to provide both the flags type and the original enum type - // as a choice at runtime. - auto flagsTypeEntry = static_cast<const FlagsTypeEntry *>(m_typeEntry); - auto enumTypeEntry = flagsTypeEntry->originator(); - result = m_typeEntry->targetLangPackage() + u".^^"_s - + flagsTypeEntry->targetLangName() + u"^^"_s - + enumTypeEntry->targetLangName() + u"^^"_s; - } - + if (m_typeEntry->isFlags()) + result = m_typeEntry->qualifiedTargetLangName(); result.replace(u"::"_s, u"."_s); return result; } diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py index 1d4dadc55..c877f1ee4 100644 --- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py +++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/signature/parser.py @@ -434,18 +434,6 @@ def handle_retvar(obj): def calculate_props(line): - # PYSIDE-1735: QFlag is now divided into fields for future Python Enums, like - # "PySide.QtCore.^^Qt.ItemFlags^^Qt.ItemFlag^^" - # Resolve that until Enum is finally settled. - while "^^" in line: - parts = line.split("^^", 3) - selected = EnumSelect.SELECTION - line = parts[0] + parts[selected.value] + parts[3] - if selected is EnumSelect.NEW: - _old, _new = EnumSelect.OLD.value, EnumSelect.NEW.value - line = re.sub(rf"\b{parts[_old]}\b", parts[_new], line) - type_map[parts[_old]] = parts[_new] - parsed = SimpleNamespace(**_parse_line(line.strip())) arglist = parsed.arglist annotations = {} |