BareMetal: Fix recent constructor breakage

Amends f420788465. The setDisplayType() call accidentally
ended up in the desctuctor, not the constructor

Change-Id: I63593325d0a6e3250c13b9e16781159190a238b1
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2019-06-19 18:06:48 +02:00
parent c7badbd701
commit f50da02880
2 changed files with 5 additions and 2 deletions

View File

@@ -50,10 +50,13 @@ const char gdbServerProviderIdKeyC[] = "GdbServerProviderId";
// BareMetalDevice
BareMetalDevice::~BareMetalDevice()
BareMetalDevice::BareMetalDevice()
{
setDisplayType(QCoreApplication::translate("BareMetal::Internal::BareMetalDevice", "Bare Metal"));
}
BareMetalDevice::~BareMetalDevice()
{
if (GdbServerProvider *provider = GdbServerProviderManager::findProvider(m_gdbServerProviderId))
provider->unregisterDevice(this);
}

View File

@@ -62,7 +62,7 @@ public:
QVariantMap toMap() const final;
private:
explicit BareMetalDevice() = default;
BareMetalDevice();
void setChannelByServerProvider(GdbServerProvider *provider);
QString m_gdbServerProviderId;