forked from qt-creator/qt-creator
BareMetal: Remove qualifiers from setting keys
They're pure noise, since there should be no conflicts between base and derived classes, and there can't be multiple classes for the same provider. This maintains compatibility when upgrading from earlier versions, but not for downgrades. Change-Id: I02655410172ff170fca4893f7b37c2fb1f316aff Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
0a4a1693ec
commit
f487e471aa
@@ -117,7 +117,13 @@ void DebugServerProviderManager::restoreProviders()
|
|||||||
if (!data.contains(key))
|
if (!data.contains(key))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
const QVariantMap map = data.value(key).toMap();
|
QVariantMap map = data.value(key).toMap();
|
||||||
|
const QStringList keys = map.keys();
|
||||||
|
for (const QString &key : keys) {
|
||||||
|
const int lastDot = key.lastIndexOf('.');
|
||||||
|
if (lastDot != -1)
|
||||||
|
map[key.mid(lastDot + 1)] = map[key];
|
||||||
|
}
|
||||||
bool restored = false;
|
bool restored = false;
|
||||||
for (IDebugServerProviderFactory *f : qAsConst(m_factories)) {
|
for (IDebugServerProviderFactory *f : qAsConst(m_factories)) {
|
||||||
if (f->canRestore(map)) {
|
if (f->canRestore(map)) {
|
||||||
|
|||||||
@@ -46,17 +46,17 @@ using namespace Utils;
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
const char executableFileKeyC[] = "BareMetal.EBlinkGdbServerProvider.ExecutableFile";
|
const char executableFileKeyC[] = "ExecutableFile";
|
||||||
const char verboseLevelKeyC[] = "BareMetal.EBlinkGdbServerProvider.VerboseLevel";
|
const char verboseLevelKeyC[] = "VerboseLevel";
|
||||||
const char deviceScriptC[] = "BareMetal.EBlinkGdbServerProvider.DeviceScript";
|
const char deviceScriptC[] = "DeviceScript";
|
||||||
const char interfaceTypeC[] = "BareMetal.EBlinkGdbServerProvider.InterfaceType";
|
const char interfaceTypeC[] = "InterfaceType";
|
||||||
const char interfaceResetOnConnectC[] = "BareMetal.EBlinkGdbServerProvider.interfaceResetOnConnect";
|
const char interfaceResetOnConnectC[] = "interfaceResetOnConnect";
|
||||||
const char interfaceSpeedC[] = "BareMetal.EBlinkGdbServerProvider.InterfaceSpeed";
|
const char interfaceSpeedC[] = "InterfaceSpeed";
|
||||||
const char interfaceExplicidDeviceC[] = "BareMetal.EBlinkGdbServerProvider.InterfaceExplicidDevice";
|
const char interfaceExplicidDeviceC[] = "InterfaceExplicidDevice";
|
||||||
const char targetNameC[] = "BareMetal.EBlinkGdbServerProvider.TargetName";
|
const char targetNameC[] = "TargetName";
|
||||||
const char targetDisableStackC[] = "BareMetal.EBlinkGdbServerProvider.TargetDisableStack";
|
const char targetDisableStackC[] = "TargetDisableStack";
|
||||||
const char gdbShutDownAfterDisconnectC[] = "BareMetal.EBlinkGdbServerProvider.GdbShutDownAfterDisconnect";
|
const char gdbShutDownAfterDisconnectC[] = "GdbShutDownAfterDisconnect";
|
||||||
const char gdbNotUseCacheC[] = "BareMetal.EBlinkGdbServerProvider.GdbNotUseCache";
|
const char gdbNotUseCacheC[] = "GdbNotUseCache";
|
||||||
|
|
||||||
// EBlinkGdbServerProvider
|
// EBlinkGdbServerProvider
|
||||||
|
|
||||||
@@ -66,7 +66,6 @@ EBlinkGdbServerProvider::EBlinkGdbServerProvider()
|
|||||||
setInitCommands(defaultInitCommands());
|
setInitCommands(defaultInitCommands());
|
||||||
setResetCommands(defaultResetCommands());
|
setResetCommands(defaultResetCommands());
|
||||||
setChannel("127.0.0.1", 2331);
|
setChannel("127.0.0.1", 2331);
|
||||||
setSettingsKeyBase("BareMetal.EBlinkGdbServerProvider");
|
|
||||||
setTypeDisplayName(GdbServerProvider::tr("EBlink"));
|
setTypeDisplayName(GdbServerProvider::tr("EBlink"));
|
||||||
setConfigurationWidgetCreator([this] { return new EBlinkGdbServerProviderConfigWidget(this); });
|
setConfigurationWidgetCreator([this] { return new EBlinkGdbServerProviderConfigWidget(this); });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ using namespace Utils;
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
const char startupModeKeyC[] = "BareMetal.GdbServerProvider.Mode";
|
const char startupModeKeyC[] = "Mode";
|
||||||
const char peripheralDescriptionFileKeyC[] = "BareMetal.GdbServerProvider.PeripheralDescriptionFile";
|
const char peripheralDescriptionFileKeyC[] = "PeripheralDescriptionFile";
|
||||||
const char initCommandsKeyC[] = "BareMetal.GdbServerProvider.InitCommands";
|
const char initCommandsKeyC[] = "InitCommands";
|
||||||
const char resetCommandsKeyC[] = "BareMetal.GdbServerProvider.ResetCommands";
|
const char resetCommandsKeyC[] = "ResetCommands";
|
||||||
const char useExtendedRemoteKeyC[] = "BareMetal.GdbServerProvider.UseExtendedRemote";
|
const char useExtendedRemoteKeyC[] = "UseExtendedRemote";
|
||||||
|
|
||||||
// GdbServerProvider
|
// GdbServerProvider
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ GenericGdbServerProvider::GenericGdbServerProvider()
|
|||||||
: GdbServerProvider(Constants::GDBSERVER_GENERIC_PROVIDER_ID)
|
: GdbServerProvider(Constants::GDBSERVER_GENERIC_PROVIDER_ID)
|
||||||
{
|
{
|
||||||
setChannel("localhost", 3333);
|
setChannel("localhost", 3333);
|
||||||
setSettingsKeyBase("BareMetal.GenericGdbServerProvider");
|
|
||||||
setTypeDisplayName(GdbServerProvider::tr("Generic"));
|
setTypeDisplayName(GdbServerProvider::tr("Generic"));
|
||||||
setConfigurationWidgetCreator([this] { return new GenericGdbServerProviderConfigWidget(this); });
|
setConfigurationWidgetCreator([this] { return new GenericGdbServerProviderConfigWidget(this); });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ using namespace Utils;
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
const char executableFileKeyC[] = "BareMetal.JLinkGdbServerProvider.ExecutableFile";
|
const char executableFileKeyC[] = "ExecutableFile";
|
||||||
const char jlinkDeviceKeyC[] = "BareMetal.JLinkGdbServerProvider.JLinkDevice";
|
const char jlinkDeviceKeyC[] = "JLinkDevice";
|
||||||
const char jlinkHostInterfaceKeyC[] = "BareMetal.JLinkGdbServerProvider.JLinkHostInterface";
|
const char jlinkHostInterfaceKeyC[] = "JLinkHostInterface";
|
||||||
const char jlinkHostInterfaceIPAddressKeyC[] = "BareMetal.JLinkGdbServerProvider.JLinkHostInterfaceIPAddress";
|
const char jlinkHostInterfaceIPAddressKeyC[] = "JLinkHostInterfaceIPAddress";
|
||||||
const char jlinkTargetInterfaceKeyC[] = "BareMetal.JLinkGdbServerProvider.JLinkTargetInterface";
|
const char jlinkTargetInterfaceKeyC[] = "JLinkTargetInterface";
|
||||||
const char jlinkTargetInterfaceSpeedKeyC[] = "BareMetal.JLinkGdbServerProvider.JLinkTargetInterfaceSpeed";
|
const char jlinkTargetInterfaceSpeedKeyC[] = "JLinkTargetInterfaceSpeed";
|
||||||
const char additionalArgumentsKeyC[] = "BareMetal.JLinkGdbServerProvider.AdditionalArguments";
|
const char additionalArgumentsKeyC[] = "AdditionalArguments";
|
||||||
|
|
||||||
// JLinkGdbServerProvider
|
// JLinkGdbServerProvider
|
||||||
|
|
||||||
@@ -62,7 +62,6 @@ JLinkGdbServerProvider::JLinkGdbServerProvider()
|
|||||||
setInitCommands(defaultInitCommands());
|
setInitCommands(defaultInitCommands());
|
||||||
setResetCommands(defaultResetCommands());
|
setResetCommands(defaultResetCommands());
|
||||||
setChannel("localhost", 2331);
|
setChannel("localhost", 2331);
|
||||||
setSettingsKeyBase("BareMetal.JLinkGdbServerProvider");
|
|
||||||
setTypeDisplayName(GdbServerProvider::tr("JLink"));
|
setTypeDisplayName(GdbServerProvider::tr("JLink"));
|
||||||
setConfigurationWidgetCreator([this] { return new JLinkGdbServerProviderConfigWidget(this); });
|
setConfigurationWidgetCreator([this] { return new JLinkGdbServerProviderConfigWidget(this); });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ using namespace Utils;
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
const char executableFileKeyC[] = "BareMetal.OpenOcdGdbServerProvider.ExecutableFile";
|
const char executableFileKeyC[] = "ExecutableFile";
|
||||||
const char rootScriptsDirKeyC[] = "BareMetal.OpenOcdGdbServerProvider.RootScriptsDir";
|
const char rootScriptsDirKeyC[] = "RootScriptsDir";
|
||||||
const char configurationFileKeyC[] = "BareMetal.OpenOcdGdbServerProvider.ConfigurationPath";
|
const char configurationFileKeyC[] = "ConfigurationPath";
|
||||||
const char additionalArgumentsKeyC[] = "BareMetal.OpenOcdGdbServerProvider.AdditionalArguments";
|
const char additionalArgumentsKeyC[] = "AdditionalArguments";
|
||||||
|
|
||||||
// OpenOcdGdbServerProvider
|
// OpenOcdGdbServerProvider
|
||||||
|
|
||||||
@@ -57,7 +57,6 @@ OpenOcdGdbServerProvider::OpenOcdGdbServerProvider()
|
|||||||
setInitCommands(defaultInitCommands());
|
setInitCommands(defaultInitCommands());
|
||||||
setResetCommands(defaultResetCommands());
|
setResetCommands(defaultResetCommands());
|
||||||
setChannel("localhost", 3333);
|
setChannel("localhost", 3333);
|
||||||
setSettingsKeyBase("BareMetal.OpenOcdGdbServerProvider");
|
|
||||||
setTypeDisplayName(GdbServerProvider::tr("OpenOCD"));
|
setTypeDisplayName(GdbServerProvider::tr("OpenOCD"));
|
||||||
setConfigurationWidgetCreator([this] { return new OpenOcdGdbServerProviderConfigWidget(this); });
|
setConfigurationWidgetCreator([this] { return new OpenOcdGdbServerProviderConfigWidget(this); });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,11 +44,11 @@ using namespace Utils;
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
const char executableFileKeyC[] = "BareMetal.StLinkUtilGdbServerProvider.ExecutableFile";
|
const char executableFileKeyC[] = "ExecutableFile";
|
||||||
const char verboseLevelKeyC[] = "BareMetal.StLinkUtilGdbServerProvider.VerboseLevel";
|
const char verboseLevelKeyC[] = "VerboseLevel";
|
||||||
const char extendedModeKeyC[] = "BareMetal.StLinkUtilGdbServerProvider.ExtendedMode";
|
const char extendedModeKeyC[] = "ExtendedMode";
|
||||||
const char resetBoardKeyC[] = "BareMetal.StLinkUtilGdbServerProvider.ResetBoard";
|
const char resetBoardKeyC[] = "ResetBoard";
|
||||||
const char transportLayerKeyC[] = "BareMetal.StLinkUtilGdbServerProvider.TransportLayer";
|
const char transportLayerKeyC[] = "TransportLayer";
|
||||||
|
|
||||||
// StLinkUtilGdbServerProvider
|
// StLinkUtilGdbServerProvider
|
||||||
|
|
||||||
@@ -58,7 +58,6 @@ StLinkUtilGdbServerProvider::StLinkUtilGdbServerProvider()
|
|||||||
setInitCommands(defaultInitCommands());
|
setInitCommands(defaultInitCommands());
|
||||||
setResetCommands(defaultResetCommands());
|
setResetCommands(defaultResetCommands());
|
||||||
setChannel("localhost", 4242);
|
setChannel("localhost", 4242);
|
||||||
setSettingsKeyBase("BareMetal.StLinkUtilGdbServerProvider");
|
|
||||||
setTypeDisplayName(GdbServerProvider::tr("ST-LINK Utility"));
|
setTypeDisplayName(GdbServerProvider::tr("ST-LINK Utility"));
|
||||||
setConfigurationWidgetCreator([this] { return new StLinkUtilGdbServerProviderConfigWidget(this); });
|
setConfigurationWidgetCreator([this] { return new StLinkUtilGdbServerProviderConfigWidget(this); });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ namespace Internal {
|
|||||||
|
|
||||||
using namespace Uv;
|
using namespace Uv;
|
||||||
|
|
||||||
constexpr char adapterOptionsKeyC[] = "BareMetal.JLinkUvscServerProvider.AdapterOptions";
|
constexpr char adapterOptionsKeyC[] = "AdapterOptions";
|
||||||
constexpr char adapterPortKeyC[] = "BareMetal.JLinkUvscServerProvider.AdapterPort";
|
constexpr char adapterPortKeyC[] = "AdapterPort";
|
||||||
constexpr char adapterSpeedKeyC[] = "BareMetal.JLinkUvscServerProvider.AdapterSpeed";
|
constexpr char adapterSpeedKeyC[] = "AdapterSpeed";
|
||||||
|
|
||||||
static int decodeSpeedCode(JLinkUvscAdapterOptions::Speed speed)
|
static int decodeSpeedCode(JLinkUvscAdapterOptions::Speed speed)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Internal {
|
|||||||
|
|
||||||
using namespace Uv;
|
using namespace Uv;
|
||||||
|
|
||||||
const char limitSpeedKeyC[] = "BareMetal.SimulatorUvscServerProvider.LimitSpeed";
|
const char limitSpeedKeyC[] = "LimitSpeed";
|
||||||
|
|
||||||
static DriverSelection defaultSimulatorDriverSelection()
|
static DriverSelection defaultSimulatorDriverSelection()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ namespace Internal {
|
|||||||
|
|
||||||
using namespace Uv;
|
using namespace Uv;
|
||||||
|
|
||||||
constexpr char adapterOptionsKeyC[] = "BareMetal.StLinkUvscServerProvider.AdapterOptions";
|
constexpr char adapterOptionsKeyC[] = "AdapterOptions";
|
||||||
constexpr char adapterPortKeyC[] = "BareMetal.StLinkUvscServerProvider.AdapterPort";
|
constexpr char adapterPortKeyC[] = "AdapterPort";
|
||||||
constexpr char adapterSpeedKeyC[] = "BareMetal.StLinkUvscServerProvider.AdapterSpeed";
|
constexpr char adapterSpeedKeyC[] = "AdapterSpeed";
|
||||||
|
|
||||||
static QString buildAdapterOptions(const StLinkUvscAdapterOptions &opts)
|
static QString buildAdapterOptions(const StLinkUvscAdapterOptions &opts)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ namespace Internal {
|
|||||||
using namespace Uv;
|
using namespace Uv;
|
||||||
|
|
||||||
// Whole software package selection keys.
|
// Whole software package selection keys.
|
||||||
constexpr char toolsIniKeyC[] = "BareMetal.UvscServerProvider.ToolsIni";
|
constexpr char toolsIniKeyC[] = "ToolsIni";
|
||||||
constexpr char deviceSelectionKeyC[] = "BareMetal.UvscServerProvider.DeviceSelection";
|
constexpr char deviceSelectionKeyC[] = "DeviceSelection";
|
||||||
constexpr char driverSelectionKeyC[] = "BareMetal.UvscServerProvider.DriverSelection";
|
constexpr char driverSelectionKeyC[] = "DriverSelection";
|
||||||
|
|
||||||
constexpr int defaultPortNumber = 5101;
|
constexpr int defaultPortNumber = 5101;
|
||||||
|
|
||||||
|
|||||||
@@ -38,39 +38,39 @@ namespace Internal {
|
|||||||
namespace Uv {
|
namespace Uv {
|
||||||
|
|
||||||
// Software package data keys.
|
// Software package data keys.
|
||||||
constexpr char packageDescrKeyC[] = "BareMetal.UvscServerProvider.PackageDescription";
|
constexpr char packageDescrKeyC[] = "PackageDescription";
|
||||||
constexpr char packageFileKeyC[] = "BareMetal.UvscServerProvider.PackageFile";
|
constexpr char packageFileKeyC[] = "PackageFile";
|
||||||
constexpr char packageNameKeyC[] = "BareMetal.UvscServerProvider.PackageName";
|
constexpr char packageNameKeyC[] = "PackageName";
|
||||||
constexpr char packageUrlKeyC[] = "BareMetal.UvscServerProvider.PackageUrl";
|
constexpr char packageUrlKeyC[] = "PackageUrl";
|
||||||
constexpr char packageVendorNameKeyC[] = "BareMetal.UvscServerProvider.PackageVendorName";
|
constexpr char packageVendorNameKeyC[] = "PackageVendorName";
|
||||||
constexpr char packageVendorIdKeyC[] = "BareMetal.UvscServerProvider.PackageVendorId";
|
constexpr char packageVendorIdKeyC[] = "PackageVendorId";
|
||||||
constexpr char packageVersionKeyC[] = "BareMetal.UvscServerProvider.PackageVersion";
|
constexpr char packageVersionKeyC[] = "PackageVersion";
|
||||||
// Device data keys.
|
// Device data keys.
|
||||||
constexpr char deviceNameKeyC[] = "BareMetal.UvscServerProvider.DeviceName";
|
constexpr char deviceNameKeyC[] = "DeviceName";
|
||||||
constexpr char deviceDescrKeyC[] = "BareMetal.UvscServerProvider.DeviceDescription";
|
constexpr char deviceDescrKeyC[] = "DeviceDescription";
|
||||||
constexpr char deviceFamilyKeyC[] = "BareMetal.UvscServerProvider.DeviceFamily";
|
constexpr char deviceFamilyKeyC[] = "DeviceFamily";
|
||||||
constexpr char deviceSubFamilyKeyC[] = "BareMetal.UvscServerProvider.DeviceSubFamily";
|
constexpr char deviceSubFamilyKeyC[] = "DeviceSubFamily";
|
||||||
constexpr char deviceVendorNameKeyC[] = "BareMetal.UvscServerProvider.DeviceVendorName";
|
constexpr char deviceVendorNameKeyC[] = "DeviceVendorName";
|
||||||
constexpr char deviceVendorIdKeyC[] = "BareMetal.UvscServerProvider.DeviceVendorId";
|
constexpr char deviceVendorIdKeyC[] = "DeviceVendorId";
|
||||||
constexpr char deviceSvdKeyC[] = "BareMetal.UvscServerProvider.DeviceSVD";
|
constexpr char deviceSvdKeyC[] = "DeviceSVD";
|
||||||
// Device CPU data keys.
|
// Device CPU data keys.
|
||||||
constexpr char deviceClockKeyC[] = "BareMetal.UvscServerProvider.DeviceClock";
|
constexpr char deviceClockKeyC[] = "DeviceClock";
|
||||||
constexpr char deviceCoreKeyC[] = "BareMetal.UvscServerProvider.DeviceCore";
|
constexpr char deviceCoreKeyC[] = "DeviceCore";
|
||||||
constexpr char deviceFpuKeyC[] = "BareMetal.UvscServerProvider.DeviceFPU";
|
constexpr char deviceFpuKeyC[] = "DeviceFPU";
|
||||||
constexpr char deviceMpuKeyC[] = "BareMetal.UvscServerProvider.DeviceMPU";
|
constexpr char deviceMpuKeyC[] = "DeviceMPU";
|
||||||
// Device MEMORY data keys.
|
// Device MEMORY data keys.
|
||||||
constexpr char deviceMemoryKeyC[] = "BareMetal.UvscServerProvider.DeviceMemory";
|
constexpr char deviceMemoryKeyC[] = "DeviceMemory";
|
||||||
constexpr char deviceMemoryIdKeyC[] = "BareMetal.UvscServerProvider.DeviceMemoryId";
|
constexpr char deviceMemoryIdKeyC[] = "DeviceMemoryId";
|
||||||
constexpr char deviceMemoryStartKeyC[] = "BareMetal.UvscServerProvider.DeviceMemoryStart";
|
constexpr char deviceMemoryStartKeyC[] = "DeviceMemoryStart";
|
||||||
constexpr char deviceMemorySizeKeyC[] = "BareMetal.UvscServerProvider.DeviceMemorySize";
|
constexpr char deviceMemorySizeKeyC[] = "DeviceMemorySize";
|
||||||
// Device ALGORITHM data keys.
|
// Device ALGORITHM data keys.
|
||||||
constexpr char deviceAlgorithmKeyC[] = "BareMetal.UvscServerProvider.DeviceAlgorithm";
|
constexpr char deviceAlgorithmKeyC[] = "DeviceAlgorithm";
|
||||||
constexpr char deviceAlgorithmPathKeyC[] = "BareMetal.UvscServerProvider.DeviceAlgorithmPath";
|
constexpr char deviceAlgorithmPathKeyC[] = "DeviceAlgorithmPath";
|
||||||
constexpr char deviceAlgorithmFlashStartKeyC[] = "BareMetal.UvscServerProvider.DeviceAlgorithmStart";
|
constexpr char deviceAlgorithmFlashStartKeyC[] = "DeviceAlgorithmStart";
|
||||||
constexpr char deviceAlgorithmFlashSizeKeyC[] = "BareMetal.UvscServerProvider.DeviceAlgorithmSize";
|
constexpr char deviceAlgorithmFlashSizeKeyC[] = "DeviceAlgorithmSize";
|
||||||
constexpr char deviceAlgorithmRamStartKeyC[] = "BareMetal.UvscServerProvider.DeviceAlgorithmRamStart";
|
constexpr char deviceAlgorithmRamStartKeyC[] = "DeviceAlgorithmRamStart";
|
||||||
constexpr char deviceAlgorithmRamSizeKeyC[] = "BareMetal.UvscServerProvider.DeviceAlgorithmRamSize";
|
constexpr char deviceAlgorithmRamSizeKeyC[] = "DeviceAlgorithmRamSize";
|
||||||
constexpr char deviceAlgorithmIndexKeyC[] = "BareMetal.UvscServerProvider.DeviceAlgorithmIndex";
|
constexpr char deviceAlgorithmIndexKeyC[] = "DeviceAlgorithmIndex";
|
||||||
|
|
||||||
// DeviceSelection
|
// DeviceSelection
|
||||||
|
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ namespace Internal {
|
|||||||
namespace Uv {
|
namespace Uv {
|
||||||
|
|
||||||
// Driver data keys.
|
// Driver data keys.
|
||||||
constexpr char driverIndexKeyC[] = "BareMetal.UvscServerProvider.DriverIndex";
|
constexpr char driverIndexKeyC[] = "DriverIndex";
|
||||||
constexpr char driverCpuDllIndexKeyC[] = "BareMetal.UvscServerProvider.DriverCpuDllIndex";
|
constexpr char driverCpuDllIndexKeyC[] = "DriverCpuDllIndex";
|
||||||
constexpr char driverDllKeyC[] = "BareMetal.UvscServerProvider.DriverDll";
|
constexpr char driverDllKeyC[] = "DriverDll";
|
||||||
constexpr char driverCpuDllsKeyC[] = "BareMetal.UvscServerProvider.DriverCpuDlls";
|
constexpr char driverCpuDllsKeyC[] = "DriverCpuDlls";
|
||||||
constexpr char driverNameKeyC[] = "BareMetal.UvscServerProvider.DriverName";
|
constexpr char driverNameKeyC[] = "DriverName";
|
||||||
|
|
||||||
// DriverSelection
|
// DriverSelection
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ namespace Internal {
|
|||||||
|
|
||||||
// Helpers:
|
// Helpers:
|
||||||
|
|
||||||
static const char compilerCommandKeyC[] = "BareMetal.IarToolChain.CompilerPath";
|
static const char compilerCommandKeyC[] = "CompilerPath";
|
||||||
static const char compilerPlatformCodeGenFlagsKeyC[] = "BareMetal.IarToolChain.PlatformCodeGenFlags";
|
static const char compilerPlatformCodeGenFlagsKeyC[] = "PlatformCodeGenFlags";
|
||||||
static const char targetAbiKeyC[] = "BareMetal.IarToolChain.TargetAbi";
|
static const char targetAbiKeyC[] = "TargetAbi";
|
||||||
|
|
||||||
static bool compilerExists(const FilePath &compilerPath)
|
static bool compilerExists(const FilePath &compilerPath)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ using namespace ProjectExplorer;
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
const char idKeyC[] = "BareMetal.IDebugServerProvider.Id";
|
const char idKeyC[] = "Id";
|
||||||
const char displayNameKeyC[] = "BareMetal.IDebugServerProvider.DisplayName";
|
const char displayNameKeyC[] = "DisplayName";
|
||||||
const char engineTypeKeyC[] = "BareMetal.IDebugServerProvider.EngineType";
|
const char engineTypeKeyC[] = "EngineType";
|
||||||
|
|
||||||
const char hostKeySuffixC[] = ".Host";
|
const char hostKeyC[] = "Host";
|
||||||
const char portKeySuffixC[] = ".Port";
|
const char portKeyC[] = "Port";
|
||||||
|
|
||||||
static QString createId(const QString &id)
|
static QString createId(const QString &id)
|
||||||
{
|
{
|
||||||
@@ -139,11 +139,6 @@ void IDebugServerProvider::setEngineType(DebuggerEngineType engineType)
|
|||||||
providerUpdated();
|
providerUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IDebugServerProvider::setSettingsKeyBase(const QString &settingsBase)
|
|
||||||
{
|
|
||||||
m_settingsBase = settingsBase;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IDebugServerProvider::operator==(const IDebugServerProvider &other) const
|
bool IDebugServerProvider::operator==(const IDebugServerProvider &other) const
|
||||||
{
|
{
|
||||||
if (this == &other)
|
if (this == &other)
|
||||||
@@ -170,8 +165,8 @@ QVariantMap IDebugServerProvider::toMap() const
|
|||||||
{idKeyC, m_id},
|
{idKeyC, m_id},
|
||||||
{displayNameKeyC, m_displayName},
|
{displayNameKeyC, m_displayName},
|
||||||
{engineTypeKeyC, m_engineType},
|
{engineTypeKeyC, m_engineType},
|
||||||
{m_settingsBase + hostKeySuffixC, m_channel.host()},
|
{hostKeyC, m_channel.host()},
|
||||||
{m_settingsBase + portKeySuffixC, m_channel.port()},
|
{portKeyC, m_channel.port()},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -201,8 +196,8 @@ bool IDebugServerProvider::fromMap(const QVariantMap &data)
|
|||||||
m_displayName = data.value(displayNameKeyC).toString();
|
m_displayName = data.value(displayNameKeyC).toString();
|
||||||
m_engineType = static_cast<DebuggerEngineType>(
|
m_engineType = static_cast<DebuggerEngineType>(
|
||||||
data.value(engineTypeKeyC, NoEngineType).toInt());
|
data.value(engineTypeKeyC, NoEngineType).toInt());
|
||||||
m_channel.setHost(data.value(m_settingsBase + hostKeySuffixC).toString());
|
m_channel.setHost(data.value(hostKeyC).toString());
|
||||||
m_channel.setPort(data.value(m_settingsBase + portKeySuffixC).toInt());
|
m_channel.setPort(data.value(portKeyC).toInt());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,9 +233,7 @@ IDebugServerProvider *IDebugServerProviderFactory::create() const
|
|||||||
IDebugServerProvider *IDebugServerProviderFactory::restore(const QVariantMap &data) const
|
IDebugServerProvider *IDebugServerProviderFactory::restore(const QVariantMap &data) const
|
||||||
{
|
{
|
||||||
IDebugServerProvider *p = m_creator();
|
IDebugServerProvider *p = m_creator();
|
||||||
const auto updated = data;
|
if (p->fromMap(data))
|
||||||
|
|
||||||
if (p->fromMap(updated))
|
|
||||||
return p;
|
return p;
|
||||||
delete p;
|
delete p;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
void setTypeDisplayName(const QString &typeDisplayName);
|
void setTypeDisplayName(const QString &typeDisplayName);
|
||||||
void setEngineType(Debugger::DebuggerEngineType engineType);
|
void setEngineType(Debugger::DebuggerEngineType engineType);
|
||||||
void setSettingsKeyBase(const QString &settingsBase);
|
|
||||||
|
|
||||||
void providerUpdated();
|
void providerUpdated();
|
||||||
void resetId();
|
void resetId();
|
||||||
@@ -112,7 +111,6 @@ protected:
|
|||||||
QString m_id;
|
QString m_id;
|
||||||
mutable QString m_displayName;
|
mutable QString m_displayName;
|
||||||
QString m_typeDisplayName;
|
QString m_typeDisplayName;
|
||||||
QString m_settingsBase;
|
|
||||||
QUrl m_channel;
|
QUrl m_channel;
|
||||||
Debugger::DebuggerEngineType m_engineType = Debugger::NoEngineType;
|
Debugger::DebuggerEngineType m_engineType = Debugger::NoEngineType;
|
||||||
QSet<BareMetalDevice *> m_devices;
|
QSet<BareMetalDevice *> m_devices;
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ namespace Internal {
|
|||||||
|
|
||||||
// Helpers:
|
// Helpers:
|
||||||
|
|
||||||
static const char compilerCommandKeyC[] = "BareMetal.KeilToolchain.CompilerPath";
|
static const char compilerCommandKeyC[] = "CompilerPath";
|
||||||
static const char compilerPlatformCodeGenFlagsKeyC[] = "BareMetal.KeilToolchain.PlatformCodeGenFlags";
|
static const char compilerPlatformCodeGenFlagsKeyC[] = "PlatformCodeGenFlags";
|
||||||
static const char targetAbiKeyC[] = "BareMetal.KeilToolchain.TargetAbi";
|
static const char targetAbiKeyC[] = "TargetAbi";
|
||||||
|
|
||||||
static bool compilerExists(const FilePath &compilerPath)
|
static bool compilerExists(const FilePath &compilerPath)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ namespace Internal {
|
|||||||
|
|
||||||
// Helpers:
|
// Helpers:
|
||||||
|
|
||||||
static const char compilerCommandKeyC[] = "BareMetal.SdccToolChain.CompilerPath";
|
static const char compilerCommandKeyC[] = "CompilerPath";
|
||||||
static const char targetAbiKeyC[] = "BareMetal.SdccToolChain.TargetAbi";
|
static const char targetAbiKeyC[] = "TargetAbi";
|
||||||
|
|
||||||
static bool compilerExists(const FilePath &compilerPath)
|
static bool compilerExists(const FilePath &compilerPath)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user