Add arguments to choose harfbuzz engine
This commit is contained in:
parent
af8c68360a
commit
a196bc5da9
@ -177,8 +177,15 @@ class QuteBrowser(QApplication):
|
||||
action='store_false', dest='color')
|
||||
parser.add_argument('-V', '--version', help="Show version and quit.",
|
||||
action='store_true')
|
||||
parser.add_argument('command', nargs='*', help="Commands to execute "
|
||||
"on startup.", metavar=':command')
|
||||
# Note this will be checked hardcoded via sys.argv before _parse_args
|
||||
# is even run. That's also why we don't use --harfbuzz=(old|new).
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
group.add_argument('--system-harfbuzz', help="Force system harfbuzz "
|
||||
"engine", action='store_true')
|
||||
group.add_argument('--new-harfbuzz', help="Force new harfbuzz engine",
|
||||
action='store_true')
|
||||
group.add_argument('--old-harfbuzz', help="Force old harfbuzz engine",
|
||||
action='store_true')
|
||||
# URLs will actually be in command
|
||||
parser.add_argument('url', nargs='*', help="URLs to open on startup.")
|
||||
return parser.parse_args()
|
||||
|
@ -60,8 +60,13 @@ def fix_harfbuzz():
|
||||
This fixes crashes on various sites.
|
||||
See https://bugreports.qt-project.org/browse/QTBUG-36099
|
||||
"""
|
||||
if sys.platform.startswith('linux'):
|
||||
if (sys.platform.startswith('linux') and
|
||||
'--system-harfbuzz' not in sys.argv):
|
||||
os.environ['QT_HARFBUZZ'] = 'old'
|
||||
elif '--old-harfbuzz' in sys.argv:
|
||||
os.environ['QT_HARFBUZZ'] = 'old'
|
||||
elif '--new-harfbuzz' in sys.argv:
|
||||
os.environ['QT_HARFBUZZ'] = 'new'
|
||||
|
||||
|
||||
# At this point we can safely import Qt stuff, but we can't be sure it's
|
||||
|
Loading…
Reference in New Issue
Block a user