eric6/WebBrowser/History/HistoryModel.py

changeset 8227
349308e84eeb
parent 8218
7c09585bd960
child 8243
cc717c2ae956
--- a/eric6/WebBrowser/History/HistoryModel.py	Mon Apr 12 18:25:52 2021 +0200
+++ b/eric6/WebBrowser/History/HistoryModel.py	Mon Apr 12 19:05:23 2021 +0200
@@ -122,10 +122,12 @@
                 return itm.url
             elif index.column() == 2:
                 return itm.visitCount
-        elif role == Qt.ItemDataRole.DecorationRole:
-            if index.column() == 0:
-                return WebBrowser.WebBrowserWindow.WebBrowserWindow.icon(
-                    QUrl(itm.url))
+        elif (
+            role == Qt.ItemDataRole.DecorationRole and
+            index.column() == 0
+        ):
+            return WebBrowser.WebBrowserWindow.WebBrowserWindow.icon(
+                QUrl(itm.url))
         
         return None
     

eric ide

mercurial