forked from qt-creator/qt-creator
Debugger: Add 'Run in terminal' to Start External dialog.
This commit is contained in:
@@ -594,6 +594,16 @@ bool StartExternalDialog::breakAtMain() const
|
|||||||
return m_ui->checkBoxBreakAtMain->isChecked();
|
return m_ui->checkBoxBreakAtMain->isChecked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool StartExternalDialog::runInTerminal() const
|
||||||
|
{
|
||||||
|
return m_ui->checkBoxRunInTerminal->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartExternalDialog::setRunInTerminal(bool v)
|
||||||
|
{
|
||||||
|
m_ui->checkBoxRunInTerminal->setChecked(v);
|
||||||
|
}
|
||||||
|
|
||||||
ProjectExplorer::Abi StartExternalDialog::abi() const
|
ProjectExplorer::Abi StartExternalDialog::abi() const
|
||||||
{
|
{
|
||||||
return m_ui->toolChainComboBox->abi();
|
return m_ui->toolChainComboBox->abi();
|
||||||
|
|||||||
@@ -158,6 +158,9 @@ public:
|
|||||||
|
|
||||||
bool breakAtMain() const;
|
bool breakAtMain() const;
|
||||||
|
|
||||||
|
bool runInTerminal() const;
|
||||||
|
void setRunInTerminal(bool v);
|
||||||
|
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
@@ -1363,6 +1363,8 @@ void DebuggerPluginPrivate::startExternalApplication()
|
|||||||
configValue(_("LastExternalExecutableFile")).toString());
|
configValue(_("LastExternalExecutableFile")).toString());
|
||||||
dlg.setExecutableArguments(
|
dlg.setExecutableArguments(
|
||||||
configValue(_("LastExternalExecutableArguments")).toString());
|
configValue(_("LastExternalExecutableArguments")).toString());
|
||||||
|
dlg.setRunInTerminal(
|
||||||
|
configValue(_("LastExternalRunInTerminal")).toBool());
|
||||||
dlg.setWorkingDirectory(
|
dlg.setWorkingDirectory(
|
||||||
configValue(_("LastExternalWorkingDirectory")).toString());
|
configValue(_("LastExternalWorkingDirectory")).toString());
|
||||||
dlg.setAbiIndex(configValue(_("LastExternalAbiIndex")).toInt());
|
dlg.setAbiIndex(configValue(_("LastExternalAbiIndex")).toInt());
|
||||||
@@ -1376,6 +1378,8 @@ void DebuggerPluginPrivate::startExternalApplication()
|
|||||||
dlg.executableArguments());
|
dlg.executableArguments());
|
||||||
setConfigValue(_("LastExternalWorkingDirectory"),
|
setConfigValue(_("LastExternalWorkingDirectory"),
|
||||||
dlg.workingDirectory());
|
dlg.workingDirectory());
|
||||||
|
setConfigValue(_("LastExternalRunInTerminal"),
|
||||||
|
dlg.runInTerminal());
|
||||||
setConfigValue(_("LastExternalAbiIndex"), QVariant(dlg.abiIndex()));
|
setConfigValue(_("LastExternalAbiIndex"), QVariant(dlg.abiIndex()));
|
||||||
|
|
||||||
sp.executable = dlg.executableFile();
|
sp.executable = dlg.executableFile();
|
||||||
@@ -1384,6 +1388,7 @@ void DebuggerPluginPrivate::startExternalApplication()
|
|||||||
sp.debuggerCommand = dlg.debuggerCommand();
|
sp.debuggerCommand = dlg.debuggerCommand();
|
||||||
sp.workingDirectory = dlg.workingDirectory();
|
sp.workingDirectory = dlg.workingDirectory();
|
||||||
sp.displayName = sp.executable;
|
sp.displayName = sp.executable;
|
||||||
|
sp.useTerminal = dlg.runInTerminal();
|
||||||
if (!dlg.executableArguments().isEmpty())
|
if (!dlg.executableArguments().isEmpty())
|
||||||
sp.processArgs = dlg.executableArguments();
|
sp.processArgs = dlg.executableArguments();
|
||||||
// Fixme: 1 of 3 testing hacks.
|
// Fixme: 1 of 3 testing hacks.
|
||||||
|
|||||||
@@ -2,14 +2,6 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>StartExternalDialog</class>
|
<class>StartExternalDialog</class>
|
||||||
<widget class="QDialog" name="StartExternalDialog">
|
<widget class="QDialog" name="StartExternalDialog">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>443</width>
|
|
||||||
<height>213</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Start Debugger</string>
|
<string>Start Debugger</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -52,6 +44,19 @@
|
|||||||
<widget class="QLineEdit" name="argsEdit"/>
|
<widget class="QLineEdit" name="argsEdit"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="labelRunInTerminal">
|
||||||
|
<property name="text">
|
||||||
|
<string>Run in &terminal:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>checkBoxRunInTerminal</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QCheckBox" name="checkBoxRunInTerminal"/>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="workingDirectoryLabel">
|
<widget class="QLabel" name="workingDirectoryLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Working directory:</string>
|
<string>&Working directory:</string>
|
||||||
@@ -61,10 +66,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="Utils::PathChooser" name="workingDirectory"/>
|
<widget class="Utils::PathChooser" name="workingDirectory"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="toolChainLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Tool chain:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>toolChainComboBox</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="Debugger::Internal::DebuggerToolChainComboBox" name="toolChainComboBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="labelBreakAtMain">
|
<widget class="QLabel" name="labelBreakAtMain">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Break at '&main':</string>
|
<string>Break at '&main':</string>
|
||||||
@@ -74,26 +92,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QCheckBox" name="checkBoxBreakAtMain">
|
<widget class="QCheckBox" name="checkBoxBreakAtMain">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="Debugger::Internal::DebuggerToolChainComboBox" name="toolChainComboBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="toolChainLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Tool chain:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>toolChainComboBox</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
Reference in New Issue
Block a user