forked from qt-creator/qt-creator
Move TerminalCommand into a separate file
This will ease the ConsoleProcess and QtcProcess unification. Change-Id: Idda9ad393d184088c3e3a734389761d7176bd0c0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include <utils/environment.h>
|
||||
#include <utils/environmentdialog.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/terminalcommand.h>
|
||||
#include <utils/unixutils.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -90,10 +91,10 @@ public:
|
||||
|
||||
m_ui.reloadBehavior->setCurrentIndex(EditorManager::reloadSetting());
|
||||
if (HostOsInfo::isAnyUnixHost()) {
|
||||
const QVector<TerminalCommand> availableTerminals = ConsoleProcess::availableTerminalEmulators();
|
||||
const QVector<TerminalCommand> availableTerminals = TerminalCommand::availableTerminalEmulators();
|
||||
for (const TerminalCommand &term : availableTerminals)
|
||||
m_ui.terminalComboBox->addItem(term.command, QVariant::fromValue(term));
|
||||
updateTerminalUi(ConsoleProcess::terminalEmulator());
|
||||
updateTerminalUi(TerminalCommand::terminalEmulator());
|
||||
connect(m_ui.terminalComboBox,
|
||||
QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this,
|
||||
@@ -265,7 +266,7 @@ void SystemSettingsWidget::apply()
|
||||
QtcSettings *settings = ICore::settings();
|
||||
EditorManager::setReloadSetting(IDocument::ReloadSetting(m_ui.reloadBehavior->currentIndex()));
|
||||
if (HostOsInfo::isAnyUnixHost()) {
|
||||
ConsoleProcess::setTerminalEmulator({m_ui.terminalComboBox->lineEdit()->text(),
|
||||
TerminalCommand::setTerminalEmulator({m_ui.terminalComboBox->lineEdit()->text(),
|
||||
m_ui.terminalOpenArgs->text(),
|
||||
m_ui.terminalExecuteArgs->text()});
|
||||
if (!HostOsInfo::isMacHost()) {
|
||||
|
||||
Reference in New Issue
Block a user