mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Make sure Anki resets the QtMessageHandler as it is exiting (#3620)
This commit is contained in:
parent
128f54ed90
commit
d1032d86a7
2 changed files with 3 additions and 0 deletions
|
@ -199,6 +199,7 @@ Park Hyunwoo <phu54321@naver.com>
|
||||||
Tomas Fabrizio Orsi <torsi@fi.uba.ar>
|
Tomas Fabrizio Orsi <torsi@fi.uba.ar>
|
||||||
Sawan Sunar <sawansunar24072002@gmail.com>
|
Sawan Sunar <sawansunar24072002@gmail.com>
|
||||||
hideo aoyama <https://github.com/boukendesho>
|
hideo aoyama <https://github.com/boukendesho>
|
||||||
|
Ross Brown <rbrownwsws@googlemail.com>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import atexit
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
|
@ -525,6 +526,7 @@ def setupGL(pm: aqt.profiles.ProfileManager) -> None:
|
||||||
print(f"Qt {category}: {msg} {context}")
|
print(f"Qt {category}: {msg} {context}")
|
||||||
|
|
||||||
qInstallMessageHandler(msgHandler)
|
qInstallMessageHandler(msgHandler)
|
||||||
|
atexit.register(qInstallMessageHandler, None)
|
||||||
|
|
||||||
if driver == VideoDriver.OpenGL:
|
if driver == VideoDriver.OpenGL:
|
||||||
# Leaving QT_OPENGL unset appears to sometimes produce different results
|
# Leaving QT_OPENGL unset appears to sometimes produce different results
|
||||||
|
|
Loading…
Reference in a new issue