Make method naming more consistent.

* Use id() for methods returning a string used to represent
    some type of object.
  * Use displayName() for strings that are meant to be user
    visible.
  * Quieten some warnings while touching the files anyway.
  * Move Factories to their products in the plugins where that
    was not done before.

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2010-01-07 18:17:24 +01:00
parent 8bb87fcda4
commit a6ad773722
332 changed files with 1666 additions and 1543 deletions

View File

@@ -38,6 +38,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/gnumakeparser.h>
#include <coreplugin/variablemanager.h>
#include <utils/qtcassert.h>
#include <QtGui/QFormLayout>
#include <QtGui/QGroupBox>
@@ -141,7 +142,7 @@ void GenericMakeStep::run(QFutureInterface<bool> &fi)
AbstractProcessStep::run(fi);
}
QString GenericMakeStep::name()
QString GenericMakeStep::id()
{
return Constants::MAKESTEP;
}
@@ -279,15 +280,15 @@ void GenericMakeStepConfigWidget::makeArgumentsLineEditTextEdited()
// GenericMakeStepFactory
//
bool GenericMakeStepFactory::canCreate(const QString &name) const
bool GenericMakeStepFactory::canCreate(const QString &id) const
{
return (Constants::MAKESTEP == name);
return (Constants::MAKESTEP == id);
}
ProjectExplorer::BuildStep *GenericMakeStepFactory::create(ProjectExplorer::BuildConfiguration *bc,
const QString &name) const
const QString &id) const
{
Q_ASSERT(name == Constants::MAKESTEP);
Q_ASSERT(id == Constants::MAKESTEP);
return new GenericMakeStep(bc);
}
@@ -297,12 +298,14 @@ ProjectExplorer::BuildStep *GenericMakeStepFactory::clone(ProjectExplorer::Build
return new GenericMakeStep(static_cast<GenericMakeStep*>(bs), bc);
}
QStringList GenericMakeStepFactory::canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration * /* pro */) const
QStringList GenericMakeStepFactory::canCreateForBuildConfiguration(ProjectExplorer::BuildConfiguration *bc) const
{
Q_UNUSED(bc);
return QStringList();
}
QString GenericMakeStepFactory::displayNameForName(const QString & /* name */) const
QString GenericMakeStepFactory::displayNameForId(const QString &id) const
{
QTC_ASSERT(id == Constants::MAKESTEP, return QString());
return "Make";
}