mirror of
https://github.com/ankitects/anki.git
synced 2025-11-19 02:57:14 -05:00
* Alias PyQt5 to PyQt6 on PyQt6 builds Restores basic compatibility with PyQt5 add-ons * Register QtCore early to work around sip error * Monkey-patch unscoped enums that are in use by add-ons back in Enums whose namespace moved with PyQt6 were determined using the tooling in https://github.com/qutebrowser/qutebrowser/issues/5904 Relevant enums for the Anki add-on ecosystem were found by grepping through all AnkiWeb add-ons and a selection of GitHub-released add-ons. * Add full Qt.Key namespace Maintains compatibility with add-ons that allow specifying key bindings via Qt.Key enums * Reintroduce PyQt6.Qt as an alias for QtCore.Qt * Alias classes shifted from QtWidgets to QtGui * Add missing enums Adds ≈200 enums that were missed during the initial grep * Map exec_ calls to exec * Tweak section headers * Fix QtWebEngineWidgets imports failing due to delayed import Addesses: "QtWebEngineWidgets must be imported before a QCoreApplication instance is created" * Register additional aliases for top-level Qt modules Given how we have had to deal with side-effects when not registering other aliased imports ahead of time, it seems safer to also register the remaining few with sys.modules. * Handle calls to deprecated PyQt resource API graciously * Create QtWebEngineWidgets aliases for classes moved to QtWebEngineCore * Alias QShortcut * Restore QWebEnginePage.view() * Alias sip to PyQt6.sip * Alias QtCore.QRegExp to QtCore.QRegularExpression * Restructure aqt.qt into package Pre-requirement for aliasing the PyQt5.Qt namespace correctly. Should hopefully also make it easier to keep an overview as Qt-compat-related modules were proliferating. * Properly alias PyQt5.Qt PyQt5.Qt used to serve as a common namespace for all Qt classes, not just QtCore.Qt.* While this changes does not make all classes accessible via PyQt5.Qt, it does so for the most important Qt submodules, which should cover most add-on breakages. * Simplify Qt resource system legacy handling * Also alias PyQt6.Qt Covers imports of the form `from PyQt5 import import Qt` (due to previous aliasing of PyQt5 to PyQt6) * Add missing enums Better approach to grepping through add-ons yielded additional hits * Run formatters * Satisfy pylint |
||
|---|---|---|
| .. | ||
| browser | ||
| data | ||
| forms | ||
| operations | ||
| qt | ||
| __init__.py | ||
| about.py | ||
| addcards.py | ||
| addons.py | ||
| BUILD.bazel | ||
| changenotetype.py | ||
| clayout.py | ||
| colors.py | ||
| customstudy.py | ||
| dbcheck.py | ||
| deckbrowser.py | ||
| deckchooser.py | ||
| deckconf.py | ||
| deckdescription.py | ||
| deckoptions.py | ||
| editcurrent.py | ||
| editor.py | ||
| emptycards.py | ||
| errors.py | ||
| exporting.py | ||
| fields.py | ||
| filtered_deck.py | ||
| flags.py | ||
| gui_hooks.py | ||
| hooks_gen.py | ||
| importing.py | ||
| legacy.py | ||
| main.py | ||
| mediacheck.py | ||
| mediasrv.py | ||
| mediasync.py | ||
| modelchooser.py | ||
| models.py | ||
| mpv.py | ||
| notetypechooser.py | ||
| overview.py | ||
| package.py | ||
| pinnedmodules.py | ||
| platform.py | ||
| preferences.py | ||
| profiles.py | ||
| progress.py | ||
| py.typed | ||
| reviewer.py | ||
| schema_change_tracker.py | ||
| sound.py | ||
| stats.py | ||
| studydeck.py | ||
| switch.py | ||
| sync.py | ||
| tagedit.py | ||
| taglimit.py | ||
| taskman.py | ||
| theme.py | ||
| toolbar.py | ||
| tts.py | ||
| undo.py | ||
| update.py | ||
| utils.py | ||
| webview.py | ||
| wheel_description.txt | ||
| winpaths.py | ||