From e8a42e6cd3765e6d70f8cb29cbfe4a308064ce3d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 15 May 2014 10:47:59 +0200 Subject: [PATCH] Remove _signal_needs_caching from SignalCache --- qutebrowser/utils/signals.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/qutebrowser/utils/signals.py b/qutebrowser/utils/signals.py index 9e3c03635..181cfade1 100644 --- a/qutebrowser/utils/signals.py +++ b/qutebrowser/utils/signals.py @@ -73,10 +73,6 @@ class SignalCache(QObject): self._uncached = uncached self._signal_dict = OrderedDict() - def _signal_needs_caching(self, signal): - """Return True if a signal should be cached, False otherwise.""" - return not signal_name(signal) in self._uncached - def add(self, sig, args): """Add a new signal to the signal cache. @@ -91,7 +87,7 @@ class SignalCache(QObject): Emit: Cached signals. """ - if not self._signal_needs_caching(sig): + if signal_name(sig) in self._uncached: return had_signal = sig.signal in self._signal_dict self._signal_dict[sig.signal] = (sig, args)