Rename method to more generic name

This commit is contained in:
Nyall Dawson 2025-09-30 08:34:44 +10:00
parent d63653925c
commit d9a4c80aa9
3 changed files with 7 additions and 5 deletions

View File

@ -19,5 +19,4 @@ __author__ = "Salvatore Larosa"
__date__ = "September 2012"
__copyright__ = "(C) 2012, Salvatore Larosa"
from .console import show_console # NOQA
from .console import init_options_widget
from .console import show_console, init_console # NOQA

View File

@ -106,8 +106,11 @@ def console_displayhook(obj):
_console_output = obj
def init_options_widget():
"""called from QGIS to add the console options widget"""
def init_console():
"""
Called from QGIS to initialize the console related options and shortcuts,
before the dock is shown
"""
global _options_factory
_options_factory.setTitle(QCoreApplication.translate("PythonConsole", "Python"))
iface.registerOptionsWidgetFactory(_options_factory)

View File

@ -3247,7 +3247,7 @@ void QgisApp::showStyleManager()
void QgisApp::initPythonConsoleOptions()
{
QgsPythonRunner::run( QStringLiteral( "import console" ) );
QgsPythonRunner::run( QStringLiteral( "console.init_options_widget()" ) );
QgsPythonRunner::run( QStringLiteral( "console.init_console()" ) );
}
void QgisApp::showPythonDialog()