diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp index 70e88a6e4c261fd2c8ff542bdc4146ea0a883739..70401043f0801e750b5a4118442c05c745dd63cd 100644 --- a/src/plugins/debugger/debuggerdialogs.cpp +++ b/src/plugins/debugger/debuggerdialogs.cpp @@ -561,10 +561,8 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript) { setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); m_ui->setupUi(this); + m_ui->toolchainComboBox->init(false); m_ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); - m_ui->debuggerPathChooser->setExpectedKind(PathChooser::File); - m_ui->debuggerPathChooser->setPromptDialogTitle(tr("Select Debugger")); - m_ui->debuginfoPathChooser->setExpectedKind(PathChooser::File); m_ui->debuginfoPathChooser->setPromptDialogTitle(tr("Select Location of Debugging Information")); m_ui->executablePathChooser->setExpectedKind(PathChooser::File); m_ui->executablePathChooser->setPromptDialogTitle(tr("Select Executable")); @@ -611,14 +609,25 @@ QString StartRemoteDialog::localExecutable() const return m_ui->executablePathChooser->path(); } -void StartRemoteDialog::setDebugger(const QString &debugger) +ProjectExplorer::Abi StartRemoteDialog::abi() const +{ + return m_ui->toolchainComboBox->abi(); +} + +void StartRemoteDialog::setAbiIndex(int i) +{ + if (i >= 0 && i < m_ui->toolchainComboBox->count()) + m_ui->toolchainComboBox->setCurrentIndex(i); +} + +int StartRemoteDialog::abiIndex() const { - m_ui->debuggerPathChooser->setPath(debugger); + return m_ui->toolchainComboBox->currentIndex(); } -QString StartRemoteDialog::debugger() const +QString StartRemoteDialog::debuggerCommand() const { - return m_ui->debuggerPathChooser->path(); + return m_ui->toolchainComboBox->debuggerCommand(); } void StartRemoteDialog::setDebugInfoLocation(const QString &location) diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h index e9a689bef517cbdb96afcd7fc7e1e8f48c6c29c2..d9d3096152182b80e7fdf228b642fcad48392f40 100644 --- a/src/plugins/debugger/debuggerdialogs.h +++ b/src/plugins/debugger/debuggerdialogs.h @@ -195,8 +195,10 @@ public: QString sysroot() const; void setSysroot(const QString &sysroot); - QString debugger() const; - void setDebugger(const QString &debugger); + int abiIndex() const; + void setAbiIndex(int); + ProjectExplorer::Abi abi() const; + QString debuggerCommand() const; void setDebugInfoLocation(const QString &location); QString debugInfoLocation() const; diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 1d332b7f187c87622f58802e4eaa9f72f72430ec..3078dce397f025ebe6659642b4770c6aa40e1178 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1614,7 +1614,7 @@ void DebuggerPluginPrivate::attachCore() AttachCoreDialog dlg(mainWindow()); dlg.setExecutableFile(configValue(_("LastExternalExecutableFile")).toString()); dlg.setCoreFile(configValue(_("LastExternalCoreFile")).toString()); - dlg.setAbiIndex(configValue(_("LastExternalCoreAbiIndex")).toInt()); + dlg.setAbiIndex(configValue(_("LastExternalAbiIndex")).toInt()); dlg.setSysroot(configValue(_("LastSysroot")).toString()); dlg.setOverrideStartScript(configValue(_("LastExternalStartScript")).toString()); @@ -1623,7 +1623,7 @@ void DebuggerPluginPrivate::attachCore() setConfigValue(_("LastExternalExecutableFile"), dlg.executableFile()); setConfigValue(_("LastExternalCoreFile"), dlg.coreFile()); - setConfigValue(_("LastExternalCoreAbiIndex"), QVariant(dlg.abiIndex())); + setConfigValue(_("LastExternalAbiIndex"), QVariant(dlg.abiIndex())); setConfigValue(_("LastSysroot"), dlg.sysroot()); setConfigValue(_("LastExternalStartScript"), dlg.overrideStartScript()); @@ -1690,7 +1690,7 @@ bool DebuggerPluginPrivate::queryRemoteParameters(DebuggerStartParameters &sp, b configValue(_("LastRemoteChannel")).toString()); dlg.setLocalExecutable( configValue(_("LastLocalExecutable")).toString()); - dlg.setDebugger(configValue(_("LastDebugger")).toString()); + dlg.setAbiIndex(configValue(_("LastExternalAbiIndex")).toInt()); dlg.setRemoteArchitecture(lastUsed); dlg.setOverrideStartScript(configValue(_("LastRemoteStartScript")).toString()); dlg.setServerStartScript( @@ -1703,7 +1703,7 @@ bool DebuggerPluginPrivate::queryRemoteParameters(DebuggerStartParameters &sp, b return false; setConfigValue(_("LastRemoteChannel"), dlg.remoteChannel()); setConfigValue(_("LastLocalExecutable"), dlg.localExecutable()); - setConfigValue(_("LastDebugger"), dlg.debugger()); + setConfigValue(_("LastExternalAbiIndex"), QVariant(dlg.abiIndex())); setConfigValue(_("LastRemoteArchitecture"), dlg.remoteArchitecture()); setConfigValue(_("LastRemoteStartScript"), dlg.overrideStartScript()); setConfigValue(_("LastServerStartScript"), dlg.serverStartScript()); @@ -1714,9 +1714,8 @@ bool DebuggerPluginPrivate::queryRemoteParameters(DebuggerStartParameters &sp, b sp.remoteArchitecture = dlg.remoteArchitecture(); sp.executable = dlg.localExecutable(); sp.displayName = tr("Remote: \"%1\"").arg(sp.remoteChannel); - sp.debuggerCommand = dlg.debugger(); // Override toolchain-detection. - if (!sp.debuggerCommand.isEmpty()) - sp.toolChainAbi = Abi(); + sp.debuggerCommand = dlg.debuggerCommand(); + sp.toolChainAbi = dlg.abi(); sp.overrideStartScript = dlg.overrideStartScript(); sp.useServerStartScript = dlg.useServerStartScript(); sp.serverStartScript = dlg.serverStartScript(); diff --git a/src/plugins/debugger/startremotedialog.ui b/src/plugins/debugger/startremotedialog.ui index 1ad0b07b1825bb59073c718c6a7cf504b5bfa13d..7df03e954dfd3f8d021d4d85fd709f6bcc8ea1c4 100644 --- a/src/plugins/debugger/startremotedialog.ui +++ b/src/plugins/debugger/startremotedialog.ui @@ -22,16 +22,13 @@ <item row="0" column="0"> <widget class="QLabel" name="debuggerLabel"> <property name="text"> - <string>&Debugger:</string> + <string>Tool &chain:</string> </property> <property name="buddy"> - <cstring>debuggerPathChooser</cstring> + <cstring>toolchainComboBox</cstring> </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"> @@ -95,7 +92,7 @@ <item row="5" column="0"> <widget class="QLabel" name="debuginfoLabel"> <property name="text"> - <string>Location of debugging information:</string> + <string>Location of debugging &information:</string> </property> <property name="buddy"> <cstring>debuginfoPathChooser</cstring> @@ -144,6 +141,9 @@ <item row="8" column="1"> <widget class="Utils::PathChooser" name="serverStartScriptPathChooser" native="true"/> </item> + <item row="0" column="1"> + <widget class="Debugger::Internal::DebuggerToolChainComboBox" name="toolchainComboBox"/> + </item> </layout> </item> <item> @@ -169,6 +169,11 @@ <signal>browsingFinished()</signal> </slots> </customwidget> + <customwidget> + <class>Debugger::Internal::DebuggerToolChainComboBox</class> + <extends>QComboBox</extends> + <header>debuggertoolchaincombobox.h</header> + </customwidget> </customwidgets> <resources/> <connections/>