Make sure Anki resets the QtMessageHandler as it is exiting (#3620)

This commit is contained in:
Ross Brown 2024-12-09 04:39:45 +00:00 committed by GitHub
parent 128f54ed90
commit d1032d86a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

@ -199,6 +199,7 @@ Park Hyunwoo <phu54321@naver.com>
Tomas Fabrizio Orsi <torsi@fi.uba.ar>
Sawan Sunar <sawansunar24072002@gmail.com>
hideo aoyama <https://github.com/boukendesho>
Ross Brown <rbrownwsws@googlemail.com>
********************

View file

@ -3,6 +3,7 @@
from __future__ import annotations
import atexit
import logging
import sys
from collections.abc import Callable
@ -525,6 +526,7 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None:
print(f"Qt {category}: {msg} {context}")
qInstallMessageHandler(msgHandler)
atexit.register(qInstallMessageHandler, None)
if driver == VideoDriver.OpenGL:
# Leaving QT_OPENGL unset appears to sometimes produce different results