forked from qt-creator/qt-creator
BuildConfiguration: Add static helper to turn buildtype into a string
Use that helper in the projectexplorer instead of hardcoding a mapping there. Change-Id: I8720607a869c086569661fc9e9326ed6e0f85bb3 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
This commit is contained in:
@@ -306,6 +306,21 @@ QString BuildConfiguration::disabledReason() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString BuildConfiguration::buildTypeName(BuildConfiguration::BuildType type)
|
||||
{
|
||||
switch (type) {
|
||||
case ProjectExplorer::BuildConfiguration::Debug:
|
||||
return QLatin1String("debug");
|
||||
case ProjectExplorer::BuildConfiguration::Profile:
|
||||
return QLatin1String("profile");
|
||||
case ProjectExplorer::BuildConfiguration::Release:
|
||||
return QLatin1String("release");
|
||||
case ProjectExplorer::BuildConfiguration::Unknown: // fallthrough
|
||||
default:
|
||||
return QLatin1String("unknown");
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
// IBuildConfigurationFactory
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user