forked from qt-creator/qt-creator
BareMetal: Get rid of SSH connection parameters
... as we don't use the SSH parameters at all. Tested on the STM32 NUCLEO-F767ZI board with the OpenOCD and the ST-Link providers on Windows host. Change-Id: I1e21112c9058129d14ce584a804777532933a7d9 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -80,10 +80,8 @@ void BareMetalDevice::setDebugServerProviderId(const QString &id)
|
||||
DebugServerProviderManager::findProvider(m_debugServerProviderId))
|
||||
currentProvider->unregisterDevice(this);
|
||||
m_debugServerProviderId = id;
|
||||
if (IDebugServerProvider *provider = DebugServerProviderManager::findProvider(id)) {
|
||||
provider->updateDevice(this);
|
||||
if (IDebugServerProvider *provider = DebugServerProviderManager::findProvider(id))
|
||||
provider->registerDevice(this);
|
||||
}
|
||||
}
|
||||
|
||||
void BareMetalDevice::unregisterDebugServerProvider(IDebugServerProvider *provider)
|
||||
@@ -92,14 +90,6 @@ void BareMetalDevice::unregisterDebugServerProvider(IDebugServerProvider *provid
|
||||
m_debugServerProviderId.clear();
|
||||
}
|
||||
|
||||
void BareMetalDevice::debugServerProviderUpdated(IDebugServerProvider *provider)
|
||||
{
|
||||
IDebugServerProvider *myProvider = DebugServerProviderManager::findProvider(
|
||||
m_debugServerProviderId);
|
||||
if (provider == myProvider)
|
||||
provider->updateDevice(this);
|
||||
}
|
||||
|
||||
void BareMetalDevice::fromMap(const QVariantMap &map)
|
||||
{
|
||||
IDevice::fromMap(map);
|
||||
|
@@ -54,7 +54,6 @@ public:
|
||||
QString debugServerProviderId() const;
|
||||
void setDebugServerProviderId(const QString &id);
|
||||
void unregisterDebugServerProvider(IDebugServerProvider *provider);
|
||||
void debugServerProviderUpdated(IDebugServerProvider *provider);
|
||||
|
||||
void fromMap(const QVariantMap &map) final;
|
||||
QVariantMap toMap() const final;
|
||||
|
@@ -221,19 +221,6 @@ RunWorker *GdbServerProvider::targetRunner(RunControl *runControl) const
|
||||
return new GdbServerProviderRunner(runControl, r);
|
||||
}
|
||||
|
||||
void GdbServerProvider::updateDevice(ProjectExplorer::IDevice *dev) const
|
||||
{
|
||||
QTC_ASSERT(dev, return);
|
||||
const QString channel = channelString();
|
||||
const int colon = channel.indexOf(':');
|
||||
if (colon < 0)
|
||||
return;
|
||||
QSsh::SshConnectionParameters sshParams = dev->sshParameters();
|
||||
sshParams.setHost(channel.left(colon));
|
||||
sshParams.setPort(channel.midRef(colon + 1).toUShort());
|
||||
dev->setSshParameters(sshParams);
|
||||
}
|
||||
|
||||
bool GdbServerProvider::canStartupMode(StartupMode m) const
|
||||
{
|
||||
return m == NoStartup;
|
||||
|
@@ -68,7 +68,6 @@ public:
|
||||
QString &errorMessage) const final;
|
||||
ProjectExplorer::RunWorker *targetRunner(
|
||||
ProjectExplorer::RunControl *runControl) const final;
|
||||
void updateDevice(ProjectExplorer::IDevice *dev) const final;
|
||||
|
||||
bool isValid() const override;
|
||||
virtual bool canStartupMode(StartupMode) const;
|
||||
|
@@ -151,8 +151,6 @@ void IDebugServerProvider::unregisterDevice(BareMetalDevice *device)
|
||||
void IDebugServerProvider::providerUpdated()
|
||||
{
|
||||
DebugServerProviderManager::notifyAboutUpdate(this);
|
||||
for (BareMetalDevice *device : qAsConst(m_devices))
|
||||
device->debugServerProviderUpdated(this);
|
||||
}
|
||||
|
||||
bool IDebugServerProvider::fromMap(const QVariantMap &data)
|
||||
|
@@ -82,7 +82,6 @@ public:
|
||||
QString &errorMessage) const = 0;
|
||||
virtual ProjectExplorer::RunWorker *targetRunner(
|
||||
ProjectExplorer::RunControl *runControl) const = 0;
|
||||
virtual void updateDevice(ProjectExplorer::IDevice *dev) const = 0;
|
||||
|
||||
virtual bool isValid() const = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user