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:
@@ -65,9 +65,7 @@ GenericBuildConfiguration::GenericBuildConfiguration(Target *parent, Core::Id id
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\class GenericBuildConfigurationFactory
|
||||
*/
|
||||
// GenericBuildConfigurationFactory
|
||||
|
||||
GenericBuildConfigurationFactory::GenericBuildConfigurationFactory()
|
||||
{
|
||||
@@ -79,13 +77,13 @@ GenericBuildConfigurationFactory::GenericBuildConfigurationFactory()
|
||||
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
BuildInfo info(this);
|
||||
info.typeName = tr("Build");
|
||||
info.typeName = BuildConfiguration::tr("Build");
|
||||
info.buildDirectory = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
info.kitId = k->id();
|
||||
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a generic project.
|
||||
info.displayName = tr("Default");
|
||||
info.displayName = BuildConfiguration::tr("Default");
|
||||
}
|
||||
|
||||
return QList<BuildInfo>{info};
|
||||
|
||||
Reference in New Issue
Block a user