QbsProjectManager: Do not call qbs config unnecessarily

- We know the name of the profile for a given kit. There is no need to
  call qbs config to retrieve it.
- Do not update a profile upon kit removal.

Change-Id: I1a555233091c69d9ea6daa1e4a11737719c37fdf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Christian Kandeler
2019-12-05 15:15:35 +01:00
parent 6ccdf74965
commit f0316dbae9
5 changed files with 19 additions and 16 deletions

View File

@@ -195,7 +195,7 @@ void QbsProfilesSettingsWidget::displayCurrentProfile()
const Core::Id kitId = Core::Id::fromSetting(m_ui.kitsComboBox->currentData());
const Kit * const kit = KitManager::kit(kitId);
QTC_ASSERT(kit, return);
const QString profileName = QbsProfileManager::profileForKit(kit);
const QString profileName = QbsProfileManager::ensureProfileForKit(kit);
m_ui.profileValueLabel->setText(profileName);
for (int i = 0; i < m_model.rowCount(); ++i) {
const QModelIndex currentProfileIndex = m_model.index(i, 0);