From 1c03c55b3aa061e66a802cee1e065d5649e1fc8c Mon Sep 17 00:00:00 2001 From: toofar Date: Sat, 17 Feb 2024 17:28:13 +1300 Subject: Remove `tabMoved.disconnect()` from TreeTabWdiget I don't believe this call is required, and disconnecting something that was connected in the parent class could be surprising. This was added in commit b8d9622aa64324 which says it was done for performance reasons because `update_tab_titles()` many time when `:tree-tab-collapse` was called on large trees. I agree that `update_tab_titles()` is called lots. The tree operations could be a bit more atomic. I did some work previously to prevent title updates during update (for consistency reasons, not performance reasons) in dcee69f050ff5 that helps with the `:tree-tab-collapse` case. I can see that `update_tab_titles()` is called once for each tab being hidden or show but it now doesn't do any work (`self._tab_title_update_disabled` is `True`) for any of the calls except that last one. Surprisingly the `tabMoved` signal doesn't actually seem to be fired when hiding or showing a tab group. Possibly the refactoring in late 2019 (e795eac9e1a7ce and friends) changed it so we aren't trigging that case anymore. --- qutebrowser/mainwindow/treetabwidget.py | 1 - 1 file changed, 1 deletion(-) diff --git a/qutebrowser/mainwindow/treetabwidget.py b/qutebrowser/mainwindow/treetabwidget.py index 92e18ae77..95cdd178f 100644 --- a/qutebrowser/mainwindow/treetabwidget.py +++ b/qutebrowser/mainwindow/treetabwidget.py @@ -20,7 +20,6 @@ class TreeTabWidget(TabWidget): # root of the tab tree, common for all tabs in the window self.tree_root = Node(None) super().__init__(win_id, parent) - self.tabBar().tabMoved.disconnect(self.update_tab_titles) def _init_config(self): super()._init_config() -- cgit v1.2.3-54-g00ecf