Apply changes from PR review

This commit is contained in:
Florian Bruhin 2018-03-13 08:47:41 +01:00
parent c590648077
commit dcd6bcd2f4
2 changed files with 4 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class TabbedBrowser(QWidget):
def __init__(self, *, win_id, private, parent=None): def __init__(self, *, win_id, private, parent=None):
super().__init__(parent) super().__init__(parent)
self.widget = tabwidget.TabWidget(win_id, parent) self.widget = tabwidget.TabWidget(win_id, parent=self)
self._win_id = win_id self._win_id = win_id
self._tab_insert_idx_left = 0 self._tab_insert_idx_left = 0
self._tab_insert_idx_right = -1 self._tab_insert_idx_right = -1

View File

@ -472,6 +472,7 @@ class SessionManagerStub:
def list_sessions(self): def list_sessions(self):
return self.sessions return self.sessions
class TabbedBrowserStub(QObject): class TabbedBrowserStub(QObject):
"""Stub for the tabbed-browser object.""" """Stub for the tabbed-browser object."""
@ -494,6 +495,7 @@ class TabbedBrowserStub(QObject):
def openurl(self, url, *, newtab): def openurl(self, url, *, newtab):
self.opened_url = url self.opened_url = url
class TabWidgetStub(QObject): class TabWidgetStub(QObject):
"""Stub for the tab-widget object.""" """Stub for the tab-widget object."""
@ -539,6 +541,7 @@ class TabWidgetStub(QObject):
return None return None
return self.tabs[idx - 1] return self.tabs[idx - 1]
class ApplicationStub(QObject): class ApplicationStub(QObject):
"""Stub to insert as the app object in objreg.""" """Stub to insert as the app object in objreg."""