From aebc29337a88635b6caf474216993026f28a3c49 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 4 Jul 2016 12:47:22 +0200 Subject: [PATCH] Move __iter__ to AbstractHistory --- qutebrowser/browser/tab.py | 2 +- qutebrowser/browser/webengine/webenginetab.py | 3 --- qutebrowser/browser/webkit/webkittab.py | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/qutebrowser/browser/tab.py b/qutebrowser/browser/tab.py index 1af099229..0e2006baa 100644 --- a/qutebrowser/browser/tab.py +++ b/qutebrowser/browser/tab.py @@ -330,7 +330,7 @@ class AbstractHistory: self.history = None def __iter__(self): - raise NotImplementedError + return iter(self.history.items()) def current_idx(self): raise NotImplementedError diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index fa934a917..3431b1e63 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -60,9 +60,6 @@ class WebEngineScroller(tab.AbstractScroller): class WebEngineHistory(tab.AbstractHistory): - def __iter__(self): - return iter(self.history.items()) - def current_idx(self): return self.history.currentItemIndex() diff --git a/qutebrowser/browser/webkit/webkittab.py b/qutebrowser/browser/webkit/webkittab.py index 4b77401d4..87130ca91 100644 --- a/qutebrowser/browser/webkit/webkittab.py +++ b/qutebrowser/browser/webkit/webkittab.py @@ -368,9 +368,6 @@ class WebViewScroller(tab.AbstractScroller): class WebViewHistory(tab.AbstractHistory): - def __iter__(self): - return iter(self.history.items()) - def current_idx(self): return self.history.currentItemIndex()