Migaku-Kanji-Addon icon indicating copy to clipboard operation
Migaku-Kanji-Addon copied to clipboard

[BUG] Error when pressing any key on a keyboard in stats window

Open geochip opened this issue 1 year ago • 0 comments

Describe the bug When in the Kanji stats window, pressing any key on the keyboard triggers an Error.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Kanji' -> 'Stats'
  2. Press any key on the keyboard, for example, F11.
  3. See error

Expected behavior When pressed F11, the window is supposed to enter fullscreen mode. When pressed any other key, nothing happens

Desktop (please complete the following information):

  • OS and Version: Arch Linux. Linux-6.5.9-arch2-1-x86_64-with-glibc2.38
  • Anki Version: Anki 23.10 (51a10f0) Python 3.11.5 Qt 6.6.0 PyQt 6.6.0

Additional context The problem is, probably, connected to PyQt6 changing API for enums, which are now scoped. In addon/stats_window.py Qt.Key_F11 becomes Qt.Key.Key_F11. Making this change locally on my sistem fixes the issue. Here is also a commit with similar changes in the anki repo: https://github.com/ankitects/anki/commit/a7812dedc096627692ab3d7e64b90be632f52134

Screenshots 2023-11-07_06-29-06-29-58

geochip avatar Nov 07 '23 03:11 geochip