From 8cd905a35f49125b7551f1e52302535548369a5b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 24 Oct 2021 14:24:35 +1000 Subject: [PATCH] remove a few unnecessary PyQt workarounds https://www.riverbankcomputing.com/pipermail/pyqt/2021-October/044314.html --- python/pyqt/install.py | 4 ---- qt/aqt/forms/build_ui.py | 4 ---- 2 files changed, 8 deletions(-) diff --git a/python/pyqt/install.py b/python/pyqt/install.py index 66f919773..3d13bcac7 100644 --- a/python/pyqt/install.py +++ b/python/pyqt/install.py @@ -37,10 +37,6 @@ def fix_pyi_types(): lines = file.readlines() file.seek(0) for line in lines: - # inheriting from the missing sip.sipwrapper definition - # causes missing attributes not to be detected, as it's treating - # the class as inheriting from Any - line = line.replace("PyQt6.sip.wrapper", "object") # # remove blanket getattr in QObject which also causes missing # # attributes not to be detected if "def __getattr__(self, name: str) -> typing.Any" in line: diff --git a/qt/aqt/forms/build_ui.py b/qt/aqt/forms/build_ui.py index ab7e19038..2a371f046 100644 --- a/qt/aqt/forms/build_ui.py +++ b/qt/aqt/forms/build_ui.py @@ -42,10 +42,6 @@ def with_fixes_for_qt6(code: str) -> str: "QAction.PreferencesRole", "QAction.MenuRole.PreferencesRole" ) line = line.replace("QAction.AboutRole", "QAction.MenuRole.AboutRole") - line = line.replace( - "QComboBox.AdjustToMinimumContentsLength", - "QComboBox.SizeAdjustPolicy.AdjustToMinimumContentsLength", - ) outlines.append(line) return "\n".join(outlines)