Skip to content

Commit

Permalink
Remove unused _text_widgets attribute
Browse files Browse the repository at this point in the history
I do not recall why `_text_widgets` was here in the first place. I hope `_text_widgets`
being unnecessary is the result of my glorious refactoring skills. Though I might have
falsely refactored `_text_widgets` away just as well.
  • Loading branch information
pylbrecht committed Sep 8, 2024
1 parent 89912c0 commit 437a234
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions qutebrowser/mainwindow/statusbar/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ def __init__(self, *, win_id, private, parent=None):
self.keystring = keystring.KeyString(widget=textbase.TextBaseWidget())
self.prog = progress.Progress(widget=progress.ProgressWidget(self))
self.clock = clock.Clock(widget=clock.ClockWidget())
self._text_widgets = []
self._draw_widgets()

config.instance.changed.connect(self._on_config_changed)
Expand Down Expand Up @@ -273,10 +272,6 @@ def _draw_widgets(self):
for segment in config.val.statusbar.widgets:
item = _create_item_from_config(segment, tab=tab, parent=self)

# FIXME(pylbrecht): get rid of this special case
if segment.startswith("text:"):
self._text_widgets.append(item)

self._hbox.addWidget(item.widget)

item.enable()
Expand All @@ -291,7 +286,6 @@ def _clear_widgets(self):
assert isinstance(widget, StatusBarItem)
widget.disable()
self._hbox.removeWidget(widget.widget)
self._text_widgets.clear()

@pyqtSlot()
def maybe_hide(self):
Expand Down

0 comments on commit 437a234

Please sign in to comment.