From b9abb04e4eb5e71db4e1bc69734c07cc4fe9bd3b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 4 Jun 2014 14:29:47 +0200 Subject: [PATCH] Check harfbuzz fix is executed before PyQt is imported --- qutebrowser/utils/earlyinit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qutebrowser/utils/earlyinit.py b/qutebrowser/utils/earlyinit.py index 9f7d7c2c8..b8ed10600 100644 --- a/qutebrowser/utils/earlyinit.py +++ b/qutebrowser/utils/earlyinit.py @@ -24,6 +24,7 @@ import faulthandler import textwrap import traceback import signal +import warnings # Now we initialize the faulthandler as early as possible, so we theoretically @@ -63,6 +64,8 @@ def fix_harfbuzz(args): Args: args: The argparse namespace. """ + if 'PyQt5' in sys.modules: + warnings.warn("Harfbuzz fix attempted but PyQt5 is already imported!") if sys.platform.startswith('linux') and args.harfbuzz == 'auto': os.environ['QT_HARFBUZZ'] = 'old' elif args.harfbuzz == 'old':