Commit 20d22e52 authored by hjk's avatar hjk

BareMetal: Don't assert in displayNameForId() for unknown ids

This function can be called with arbitrary ids. Follow the pattern
in other device implementations and don't choke.

Change-Id: Ica25f2d24fe673ad025883bf106fc270f27fa4fe
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: default avatarTim Sander <tim@krieglstein.org>
parent ecf3eb1d
......@@ -48,8 +48,7 @@ BareMetalDeviceConfigurationFactory::BareMetalDeviceConfigurationFactory(QObject
QString BareMetalDeviceConfigurationFactory::displayNameForId(Core::Id type) const
{
QTC_ASSERT(type == Constants::BareMetalOsType, return QString());
return tr("Bare Metal Device");
return type == Constants::BareMetalOsType ? tr("Bare Metal Device") : QString();
}
QList<Core::Id> BareMetalDeviceConfigurationFactory::availableCreationIds() const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment