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.
This commit is contained in:
Florian Bruhin 2017-07-02 18:01:37 +02:00
parent 978013e750
commit 5aac991446

View File

@ -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.