forked from qt-creator/qt-creator
ConsoleProcess: Make setSettings() a static member
Since it's not possible to use directly ICore::settings() inside Utils lib, make setSettings() a static member. This simplifies the API of other static methods. Set the settings just once now, inside main(). Change-Id: I2bcc58d4d29b5aba4a1a21a98a9f4245b24b530f Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -93,7 +93,7 @@ public:
|
||||
const QVector<TerminalCommand> availableTerminals = ConsoleProcess::availableTerminalEmulators();
|
||||
for (const TerminalCommand &term : availableTerminals)
|
||||
m_ui.terminalComboBox->addItem(term.command, QVariant::fromValue(term));
|
||||
updateTerminalUi(ConsoleProcess::terminalEmulator(ICore::settings()));
|
||||
updateTerminalUi(ConsoleProcess::terminalEmulator());
|
||||
connect(m_ui.terminalComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
@@ -265,8 +265,7 @@ void SystemSettingsWidget::apply()
|
||||
QtcSettings *settings = ICore::settings();
|
||||
EditorManager::setReloadSetting(IDocument::ReloadSetting(m_ui.reloadBehavior->currentIndex()));
|
||||
if (HostOsInfo::isAnyUnixHost()) {
|
||||
ConsoleProcess::setTerminalEmulator(settings,
|
||||
{m_ui.terminalComboBox->lineEdit()->text(),
|
||||
ConsoleProcess::setTerminalEmulator({m_ui.terminalComboBox->lineEdit()->text(),
|
||||
m_ui.terminalOpenArgs->text(),
|
||||
m_ui.terminalExecuteArgs->text()});
|
||||
if (!HostOsInfo::isMacHost()) {
|
||||
|
||||
Reference in New Issue
Block a user