BareMetal: Store host/port in ssh params of device

That's where they're read from later when invoked from Attach to Running
Debug Server dialog.

Change-Id: I6cda6796e73ee49115af3afd1d45bc89fd8aff51
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2016-05-02 22:07:28 +03:00
committed by Orgad Shaneh
parent b280c4125b
commit 9b9215afe0

View File

@@ -67,6 +67,16 @@ QString BareMetalDevice::gdbServerProviderId() const
void BareMetalDevice::setGdbServerProviderId(const QString &id)
{
m_gdbServerProviderId = id;
GdbServerProvider *provider = GdbServerProviderManager::instance()->findProvider(id);
QTC_ASSERT(provider, return);
const QString channel = provider->channel();
const int colon = channel.indexOf(QLatin1Char(':'));
if (colon < 0)
return;
QSsh::SshConnectionParameters sshParams = sshParameters();
sshParams.host = channel.left(colon);
sshParams.port = channel.mid(colon + 1).toUShort();
setSshParameters(sshParams);
}
void BareMetalDevice::fromMap(const QVariantMap &map)