mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
![]() * add AnkiWebView subclasses for stats, empty cards and find dupes ui * update ui files to use subclassed webviews instead * remove superfluous calls to AnkiWebView.set_kind * Avoid set_kind() race condition in legacy stats webview Replacing the web view is a hacky workaround, but likely a reasonable compromise for a legacy view that we do not want to maintain a separate Qt form for. * Slightly refactor AnkiWebView subclass creation and tweak inline comment + Extend create_ankiwebview_subclass() with the ability to set any init time AnkiWebView argument + Introduce some nice-to-haves in terms of static type checking support and IDE autocompletion + Mark helper function as private to discourage add-on use * Drop `AnkiWebView.set_kind` completely There no longer is an Anki-internal use case for changing the web view kind after initializing a web view, and add-ons almost certainly do not have any use for it either. Given that setting the kind after web view construction can lead to known race conditions with `domDone` signals, we should remove this method to discourage uses like this in both Anki code and add-on consumers. There currenty only seems to be one add-on calling `set_kind()`, so this seem like a justifiable API change. --------- Co-authored-by: llama <100429699+iamllama@users.noreply.github.com> |
||
---|---|---|
.. | ||
sidebar | ||
table | ||
__init__.py | ||
browser.py | ||
card_info.py | ||
find_and_replace.py | ||
find_duplicates.py | ||
layout.py | ||
previewer.py |