From 5aac991446a34877b6fb80d5d2156cb6f02e3591 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 2 Jul 2017 18:01:37 +0200 Subject: [PATCH] Remove unnecessary sip.isdeleted line Now that the StyleSheetObserver is a child of the object it observes, it should get cleaned up properly when the object is deleted. This means this is hopefully not needed anymore, even on Qt 5.2. --- qutebrowser/config/config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 8d7ed821c..1ff491037 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -24,7 +24,6 @@ import os.path import contextlib import functools -import sip from PyQt5.QtCore import pyqtSignal, pyqtSlot, QObject, QUrl from qutebrowser.config import configdata, configexc, configtypes, configfiles @@ -582,8 +581,7 @@ class StyleSheetObserver(QObject): @pyqtSlot() def _update_stylesheet(self): """Update the stylesheet for obj.""" - if not sip.isdeleted(self._obj): - self._obj.setStyleSheet(self._get_stylesheet()) + self._obj.setStyleSheet(self._get_stylesheet()) def register(self, update): """Do a first update and listen for more.