Move SessionManager init to sessions.py.
This commit is contained in:
parent
067ac13018
commit
d83da987ae
@ -187,8 +187,7 @@ class Application(QApplication):
|
||||
log.init.debug("Initializing crashlog...")
|
||||
self._handle_segfault()
|
||||
log.init.debug("Initializing sessions...")
|
||||
session_manager = sessions.SessionManager(self)
|
||||
objreg.register('session-manager', session_manager)
|
||||
sessions.init(self)
|
||||
log.init.debug("Initializing js-bridge...")
|
||||
js_bridge = qutescheme.JSBridge(self)
|
||||
objreg.register('js-bridge', js_bridge)
|
||||
|
@ -41,6 +41,16 @@ from qutebrowser.config import config
|
||||
default = object() # Sentinel value
|
||||
|
||||
|
||||
def init(parent=None):
|
||||
"""Initialize sessions.
|
||||
|
||||
Args:
|
||||
parent: The parent to use for the SessionManager.
|
||||
"""
|
||||
session_manager = SessionManager(parent)
|
||||
objreg.register('session-manager', session_manager)
|
||||
|
||||
|
||||
class SessionError(Exception):
|
||||
|
||||
"""Exception raised when a session failed to load/save."""
|
||||
|
Loading…
Reference in New Issue
Block a user