forked from qt-creator/qt-creator
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:
@@ -79,7 +79,7 @@ BuildSettingsPanel::~BuildSettingsPanel()
|
||||
delete m_widget;
|
||||
}
|
||||
|
||||
QString BuildSettingsPanel::name() const
|
||||
QString BuildSettingsPanel::displayName() const
|
||||
{
|
||||
return QApplication::tr("Build Settings");
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void BuildSettingsWidget::setupUi()
|
||||
this, SLOT(checkMakeActiveLabel()));
|
||||
|
||||
if (m_project->buildConfigurationFactory())
|
||||
connect(m_project->buildConfigurationFactory(), SIGNAL(availableCreationTypesChanged()), SLOT(updateAddButtonMenu()));
|
||||
connect(m_project->buildConfigurationFactory(), SIGNAL(availableCreationIdsChanged()), SLOT(updateAddButtonMenu()));
|
||||
|
||||
updateAddButtonMenu();
|
||||
updateBuildSettings();
|
||||
@@ -221,9 +221,9 @@ void BuildSettingsWidget::updateAddButtonMenu()
|
||||
this, SLOT(cloneConfiguration()));
|
||||
IBuildConfigurationFactory *factory = m_project->buildConfigurationFactory();
|
||||
if (factory) {
|
||||
foreach (const QString &type, factory->availableCreationTypes()) {
|
||||
QAction *action = m_addButtonMenu->addAction(factory->displayNameForType(type), this, SLOT(createConfiguration()));
|
||||
action->setData(type);
|
||||
foreach (const QString &id, factory->availableCreationIds()) {
|
||||
QAction *action = m_addButtonMenu->addAction(factory->displayNameForId(id), this, SLOT(createConfiguration()));
|
||||
action->setData(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user