forked from qt-creator/qt-creator
ProjectExplorer: De-QObject-ify BuildConfigurationFactories
The QObject was not heavily used. Object name was for debugging only, translation context can be taken from the corresponding BuildConfiguration objects, the qobject_casts in the three big importers are replaced by dynamic_cast, which is good enough in that context. Take the opportunity to re-use translations from base BuildConfiguration for the common cases and sprinkle in some 'final'. Change-Id: I8e9727c98c6e943cb333556861c24e701c2bdf45 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -467,27 +467,27 @@ BuildInfo CMakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
|
||||
switch (buildType) {
|
||||
case BuildTypeNone:
|
||||
info.typeName = "Build";
|
||||
info.displayName = tr("Build");
|
||||
info.displayName = BuildConfiguration::tr("Build");
|
||||
info.buildType = BuildConfiguration::Unknown;
|
||||
break;
|
||||
case BuildTypeDebug:
|
||||
info.typeName = "Debug";
|
||||
info.displayName = tr("Debug");
|
||||
info.displayName = BuildConfiguration::tr("Debug");
|
||||
info.buildType = BuildConfiguration::Debug;
|
||||
break;
|
||||
case BuildTypeRelease:
|
||||
info.typeName = "Release";
|
||||
info.displayName = tr("Release");
|
||||
info.displayName = BuildConfiguration::tr("Release");
|
||||
info.buildType = BuildConfiguration::Release;
|
||||
break;
|
||||
case BuildTypeMinSizeRel:
|
||||
info.typeName = "MinSizeRel";
|
||||
info.displayName = tr("Minimum Size Release");
|
||||
info.displayName = CMakeBuildConfiguration::tr("Minimum Size Release");
|
||||
info.buildType = BuildConfiguration::Release;
|
||||
break;
|
||||
case BuildTypeRelWithDebInfo:
|
||||
info.typeName = "RelWithDebInfo";
|
||||
info.displayName = tr("Release with Debug Information");
|
||||
info.displayName = CMakeBuildConfiguration::tr("Release with Debug Information");
|
||||
info.buildType = BuildConfiguration::Profile;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user