Move debug console from app to utilcmd
This commit is contained in:
parent
90820126b4
commit
fe5d9939b9
@ -57,7 +57,6 @@ class Application(QApplication):
|
||||
meta_registry: The object registry of object registries.
|
||||
_args: ArgumentParser instance.
|
||||
_commandrunner: The main CommandRunner instance.
|
||||
_debugconsole: The ConsoleWidget for debugging.
|
||||
_keyparsers: A mapping from modes to keyparsers.
|
||||
_shutting_down: True if we're currently shutting down.
|
||||
_quit_status: The current quitting status.
|
||||
@ -136,7 +135,8 @@ class Application(QApplication):
|
||||
mainwin = mainwindow.MainWindow()
|
||||
self.registry['mainwindow'] = mainwin
|
||||
log.init.debug("Initializing debug console...")
|
||||
self._debugconsole = console.ConsoleWidget()
|
||||
debug_console = console.ConsoleWidget()
|
||||
self.registry['debug-console'] = debug_console
|
||||
log.init.debug("Initializing eventfilter...")
|
||||
self.installEventFilter(modeman_obj)
|
||||
self.setQuitOnLastWindowClosed(False)
|
||||
@ -681,11 +681,6 @@ class Application(QApplication):
|
||||
self._crashdlg = crash.ReportDialog(pages, history, objects)
|
||||
self._crashdlg.show()
|
||||
|
||||
@cmdutils.register(instance='app', debug=True, name='debug-console')
|
||||
def show_debugconsole(self):
|
||||
"""Show the debugging console."""
|
||||
self._debugconsole.show()
|
||||
|
||||
def interrupt(self, signum, _frame):
|
||||
"""Handler for signals to gracefully shutdown (SIGINT/SIGTERM).
|
||||
|
||||
|
@ -25,7 +25,7 @@ import functools
|
||||
|
||||
from PyQt5.QtCore import QCoreApplication
|
||||
|
||||
from qutebrowser.utils import usertypes, log
|
||||
from qutebrowser.utils import usertypes, log, utils
|
||||
from qutebrowser.commands import runners, cmdexc, cmdutils
|
||||
from qutebrowser.config import config, style
|
||||
|
||||
@ -100,3 +100,9 @@ def debug_cache_stats():
|
||||
style_info = style.get_stylesheet.cache_info()
|
||||
log.misc.debug('config: {}'.format(config_info))
|
||||
log.misc.debug('style: {}'.format(style_info))
|
||||
|
||||
|
||||
@cmdutils.register(debug=True)
|
||||
def debug_console():
|
||||
"""Show the debugging console."""
|
||||
utils.get_object('debug-console').show()
|
||||
|
Loading…
Reference in New Issue
Block a user