diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-06-23 12:04:45 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-06-23 12:07:47 +0200 |
commit | 370bd12a1512f5164be0e3ae1838515957e587fb (patch) | |
tree | 27c54d5ad70e4de9c09631c09d6945185f13c9dd | |
parent | c09e013e81842f123382e306ed802125882bd1c1 (diff) | |
download | qutebrowser-370bd12a1512f5164be0e3ae1838515957e587fb.tar.gz qutebrowser-370bd12a1512f5164be0e3ae1838515957e587fb.zip |
Remove now unneeded WrapperLayout.unwrap
-rw-r--r-- | qutebrowser/misc/miscwidgets.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/qutebrowser/misc/miscwidgets.py b/qutebrowser/misc/miscwidgets.py index 95786e3c7..868796e99 100644 --- a/qutebrowser/misc/miscwidgets.py +++ b/qutebrowser/misc/miscwidgets.py @@ -240,7 +240,6 @@ class WrapperLayout(QLayout): def __init__(self, parent=None): super().__init__(parent) self._widget = None # type: typing.Optional[QWidget] - self._container = None # type: typing.Optional[QWidget] def addItem(self, _widget): raise utils.Unreachable @@ -265,23 +264,10 @@ class WrapperLayout(QLayout): def wrap(self, container, widget): """Wrap the given widget in the given container.""" - self._container = container self._widget = widget container.setFocusProxy(widget) widget.setParent(container) - def unwrap(self): - """Remove the widget from this layout. - - Does nothing if it nothing was wrapped before. - """ - if self._widget is None: - return - assert self._container is not None - self._widget.setParent(None) # type: ignore[call-overload] - self._widget = None - self._container.setFocusProxy(None) # type: ignore[arg-type] - class PseudoLayout(QLayout): |