forked from qt-creator/qt-creator
ProjectExplorer: Code cosmetics
rename KitManager::kitInformation() to kitAspects, make it return a const list to be able to use clutter-free ranged for. Polish vicinity. Change-Id: Ibe187586152eb0053efa8c571adbd73158f109c4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -589,11 +589,11 @@ void KitAreaWidget::setKit(Kit *k)
|
||||
m_labels.clear();
|
||||
|
||||
int row = 0;
|
||||
foreach (KitAspect *ki, KitManager::kitInformation()) {
|
||||
if (k && k->isMutable(ki->id())) {
|
||||
KitAspectWidget *widget = ki->createConfigWidget(k);
|
||||
for (KitAspect *aspect : KitManager::kitAspects()) {
|
||||
if (k && k->isMutable(aspect->id())) {
|
||||
KitAspectWidget *widget = aspect->createConfigWidget(k);
|
||||
m_widgets << widget;
|
||||
QLabel *label = new QLabel(ki->displayName());
|
||||
QLabel *label = new QLabel(aspect->displayName());
|
||||
m_labels << label;
|
||||
|
||||
widget->setStyle(QStyleFactory::create(QLatin1String("fusion")));
|
||||
@@ -619,8 +619,8 @@ void KitAreaWidget::updateKit(Kit *k)
|
||||
bool addedMutables = false;
|
||||
QList<Core::Id> knownIdList = Utils::transform(m_widgets, &KitAspectWidget::kitInformationId);
|
||||
|
||||
foreach (KitAspect *ki, KitManager::kitInformation()) {
|
||||
Core::Id currentId = ki->id();
|
||||
for (KitAspect *aspect : KitManager::kitAspects()) {
|
||||
const Core::Id currentId = aspect->id();
|
||||
if (m_kit->isMutable(currentId) && !knownIdList.removeOne(currentId)) {
|
||||
addedMutables = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user