From 5fd3943ebcc2b1f5ebf91f9253f854fe07ffe96e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 6 Feb 2018 23:32:50 +0100 Subject: [PATCH] Make callback mandatory for tab.selection() --- qutebrowser/browser/browsertab.py | 2 +- qutebrowser/browser/webengine/webenginetab.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/browser/browsertab.py b/qutebrowser/browser/browsertab.py index e0435587e..2c0aa6722 100644 --- a/qutebrowser/browser/browsertab.py +++ b/qutebrowser/browser/browsertab.py @@ -392,7 +392,7 @@ class AbstractCaret(QObject): def drop_selection(self): raise NotImplementedError - def selection(self, callback=None): + def selection(self, callback): raise NotImplementedError def follow_selected(self, *, tab=False): diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index f42f01c24..dfb4d898c 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -289,7 +289,7 @@ class WebEngineCaret(browsertab.AbstractCaret): def drop_selection(self): self._js_call('dropSelection') - def selection(self, callback=None): + def selection(self, callback): # Not using selectedText() as WORKAROUND for # https://bugreports.qt.io/browse/QTBUG-53134 # Even on Qt 5.10 selectedText() seems to work poorly, see