Switch Qt5 shims from opt-out to opt-in

If you have an add-on that hasn't been updated yet, please contact
the add-on author. You can temporarily restore functionality by defining
an ENABLE_QT5_COMPAT=1 env var.
This commit is contained in:
Damien Elmes 2023-10-14 11:46:46 +10:00
parent 5cde4b6941
commit 76e6da6652

View file

@ -14,9 +14,8 @@ try:
except: except:
from .qt5 import * # type: ignore from .qt5 import * # type: ignore
else: else:
if not os.getenv("DISABLE_QT5_COMPAT"): if os.getenv("ENABLE_QT5_COMPAT"):
print("Running with temporary Qt5 compatibility shims.") print("Running with temporary Qt5 compatibility shims.")
print("Run with DISABLE_QT5_COMPAT=1 to confirm compatibility with Qt6.")
from . import qt5_compat # needs to be imported first from . import qt5_compat # needs to be imported first
from .qt6 import * from .qt6 import *