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...")
|
log.init.debug("Initializing crashlog...")
|
||||||
self._handle_segfault()
|
self._handle_segfault()
|
||||||
log.init.debug("Initializing sessions...")
|
log.init.debug("Initializing sessions...")
|
||||||
session_manager = sessions.SessionManager(self)
|
sessions.init(self)
|
||||||
objreg.register('session-manager', session_manager)
|
|
||||||
log.init.debug("Initializing js-bridge...")
|
log.init.debug("Initializing js-bridge...")
|
||||||
js_bridge = qutescheme.JSBridge(self)
|
js_bridge = qutescheme.JSBridge(self)
|
||||||
objreg.register('js-bridge', js_bridge)
|
objreg.register('js-bridge', js_bridge)
|
||||||
|
@ -41,6 +41,16 @@ from qutebrowser.config import config
|
|||||||
default = object() # Sentinel value
|
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):
|
class SessionError(Exception):
|
||||||
|
|
||||||
"""Exception raised when a session failed to load/save."""
|
"""Exception raised when a session failed to load/save."""
|
||||||
|
Loading…
Reference in New Issue
Block a user