forked from qt-creator/qt-creator
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: Tobias Hunger <tobias.hunger@theqtcompany.com> Reviewed-by: Tim Sander <tim@krieglstein.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user