forked from qt-creator/qt-creator
BareMetal: Don't create default GDB server provider
... if a BareMetalDevice doesn't have any configured provider yet. Reason is that a 'Default GDB' provider does not means that it is default. It just means, that this provider can be attached to the remote running GDB server (it is equivalent of "Attach to Running Debug Server"). Besides, in future, it is makes sense to remove this provider at all as it is useless. Change-Id: I2c5c59595dc7d724ac6e05177bbc6ae85cf67e2e Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -29,13 +29,10 @@
|
||||
#include "baremetaldeviceconfigurationwidget.h"
|
||||
#include "baremetaldeviceconfigurationwizard.h"
|
||||
#include "debugserverprovidermanager.h"
|
||||
|
||||
// TODO: Remove mention about GDB server providers from this file!
|
||||
#include "debugservers/gdb/defaultgdbserverprovider.h"
|
||||
#include "idebugserverprovider.h"
|
||||
|
||||
#include <coreplugin/id.h>
|
||||
|
||||
#include <ssh/sshconnection.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -112,19 +109,12 @@ void BareMetalDevice::fromMap(const QVariantMap &map)
|
||||
if (IDebugServerProvider *provider =
|
||||
DebugServerProviderManager::findByDisplayName(name)) {
|
||||
providerId = provider->id();
|
||||
} else {
|
||||
const QSsh::SshConnectionParameters sshParams = sshParameters();
|
||||
const auto newProvider = new DefaultGdbServerProvider;
|
||||
newProvider->setChannel(sshParams.url);
|
||||
newProvider->setDisplayName(name);
|
||||
if (DebugServerProviderManager::registerProvider(newProvider))
|
||||
providerId = newProvider->id();
|
||||
else
|
||||
delete newProvider;
|
||||
}
|
||||
}
|
||||
setDebugServerProviderId(providerId);
|
||||
}
|
||||
} else {
|
||||
setDebugServerProviderId(providerId);
|
||||
}
|
||||
}
|
||||
|
||||
QVariantMap BareMetalDevice::toMap() const
|
||||
{
|
||||
|
Reference in New Issue
Block a user