Don't require working icon to start

This commit is contained in:
Florian Bruhin 2017-04-03 08:32:39 +02:00
parent 9dc5e978ac
commit a11356bb99

View File

@ -170,12 +170,15 @@ def _init_icon():
for size in [16, 24, 32, 48, 64, 96, 128, 256, 512]:
filename = ':/icons/qutebrowser-{}x{}.png'.format(size, size)
pixmap = QPixmap(filename)
qtutils.ensure_not_null(pixmap)
fallback_icon.addPixmap(pixmap)
qtutils.ensure_not_null(fallback_icon)
if pixmap.isNull():
log.init.warn("Failed to load {}".format(filename))
else:
fallback_icon.addPixmap(pixmap)
icon = QIcon.fromTheme('qutebrowser', fallback_icon)
qtutils.ensure_not_null(icon)
qApp.setWindowIcon(icon)
if icon.isNull():
log.init.warn("Failed to load icon")
else:
qApp.setWindowIcon(icon)
def _process_args(args):