From 44b21374cb53bf4452ac2a8bbc6240e546c83932 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 13 Feb 2015 19:33:53 +0100 Subject: [PATCH] Fix :tab-clone. We checked for None when getting the QColor, but now with the Python dict instead of a QVariant that's a KeyError. This is a regression introduced in 3cf9768f21ce03396d47a298d1a76ba579e75e3b. --- qutebrowser/mainwindow/tabwidget.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index b5ff4ac8e..26ed45349 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -263,8 +263,9 @@ class TabBar(QTabBar): fg_color = config.get('colors', 'tabs.fg.even') tab.palette.setColor(QPalette.Window, bg_color) tab.palette.setColor(QPalette.WindowText, fg_color) - indicator_color = self._tab_data(idx, 'indicator-color') - if indicator_color is None: + try: + indicator_color = self._tab_data(idx, 'indicator-color') + except KeyError: indicator_color = QColor() tab.palette.setColor(QPalette.Base, indicator_color) if tab.rect.right() < 0 or tab.rect.left() > self.width():