Commit b5abd7b9 authored by ck's avatar ck
Browse files

Remote Debugging Dialog: Make it possible to choose the debugger.

Reviewed-by: hjk
parent 1bf34183
......@@ -224,7 +224,6 @@ static QList<ProcData> processList()
return unixProcessList();
#endif
}
///////////////////////////////////////////////////////////////////////
//
// AttachExternalDialog
......@@ -385,8 +384,11 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
{
m_ui->setupUi(this);
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
m_ui->debuggerPathChooser->setExpectedKind(Utils::PathChooser::File);
m_ui->debuggerPathChooser->setPromptDialogTitle(tr("Select Debugger"));
m_ui->executablePathChooser->setExpectedKind(Utils::PathChooser::File);
m_ui->executablePathChooser->setPromptDialogTitle(tr("Select Executable"));
m_ui->sysrootPathChooser->setPromptDialogTitle(tr("Select Sysroot"));
m_ui->serverStartScript->setExpectedKind(Utils::PathChooser::File);
m_ui->serverStartScript->setPromptDialogTitle(tr("Select Start Script"));
......@@ -424,6 +426,16 @@ QString StartRemoteDialog::localExecutable() const
return m_ui->executablePathChooser->path();
}
void StartRemoteDialog::setDebugger(const QString &debugger)
{
m_ui->debuggerPathChooser->setPath(debugger);
}
QString StartRemoteDialog::debugger() const
{
return m_ui->debuggerPathChooser->path();
}
void StartRemoteDialog::setRemoteArchitectures(const QStringList &list)
{
m_ui->architectureComboBox->clear();
......
......@@ -135,6 +135,7 @@ public:
void setRemoteArchitecture(const QString &arch);
void setRemoteArchitectures(const QStringList &arches);
void setLocalExecutable(const QString &executable);
void setDebugger(const QString &debugger);
QString localExecutable() const;
QString remoteChannel() const;
QString remoteArchitecture() const;
......@@ -144,6 +145,7 @@ public:
bool useServerStartScript() const;
void setSysRoot(const QString &sysRoot);
QString sysRoot() const;
QString debugger() const;
private slots:
void updateState();
......
......@@ -1359,6 +1359,7 @@ void DebuggerPlugin::startRemoteApplication()
configValue(_("LastRemoteChannel")).toString());
dlg.setLocalExecutable(
configValue(_("LastLocalExecutable")).toString());
dlg.setDebugger(configValue(_("LastDebugger")).toString());
dlg.setRemoteArchitecture(lastUsed);
dlg.setServerStartScript(
configValue(_("LastServerStartScript")).toString());
......@@ -1369,6 +1370,7 @@ void DebuggerPlugin::startRemoteApplication()
return;
setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel());
setConfigValue(_("LastLocalExecutable"), dlg.localExecutable());
setConfigValue(_("LastDebugger"), dlg.debugger());
setConfigValue(_("LastRemoteArchitecture"), dlg.remoteArchitecture());
setConfigValue(_("LastServerStartScript"), dlg.serverStartScript());
setConfigValue(_("LastUseServerStartScript"), dlg.useServerStartScript());
......@@ -1376,6 +1378,7 @@ void DebuggerPlugin::startRemoteApplication()
sp->remoteChannel = dlg.remoteChannel();
sp->remoteArchitecture = dlg.remoteArchitecture();
sp->executable = dlg.localExecutable();
sp->debuggerCommand = dlg.debugger();
sp->startMode = StartRemote;
if (dlg.useServerStartScript())
sp->serverStartScript = dlg.serverStartScript();
......
......@@ -25,74 +25,84 @@
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="debuggerLabel">
<property name="text">
<string>Debugger:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="debuggerPathChooser" native="true"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="executableLabel">
<property name="text">
<string>Local executable:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Utils::PathChooser" name="executablePathChooser" native="true"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="channelLabel">
<property name="text">
<string>Host and port:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QLineEdit" name="channelLineEdit">
<property name="text">
<string notr="true">localhost:5115</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="Utils::PathChooser" name="executablePathChooser" native="true"/>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="architectureLabel">
<property name="text">
<string>Architecture:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<widget class="QComboBox" name="architectureComboBox">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
</item>
<item row="5" column="1">
<widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="serverStartScriptLabel">
<item row="4" column="0">
<widget class="QLabel" name="sysrootLabel">
<property name="text">
<string>Server start script:</string>
<string>Sysroot:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="4" column="1">
<widget class="Utils::PathChooser" name="sysrootPathChooser" native="true"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="useServerStartScriptLabel">
<property name="text">
<string>Use server start script:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="sysrootLabel">
<property name="text">
<string>Sysroot:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="Utils::PathChooser" name="sysrootPathChooser" native="true"/>
<item row="5" column="1">
<widget class="QCheckBox" name="useServerStartScriptCheckBox"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="executableLabel">
<item row="6" column="0">
<widget class="QLabel" name="serverStartScriptLabel">
<property name="text">
<string>Local executable:</string>
<string>Server start script:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="Utils::PathChooser" name="serverStartScript" native="true"/>
</item>
</layout>
</item>
<item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment