QbsProjectManager: Only update run configs for active target.

Like qmake does. Otherwise, since the unique product names contain the
associated profile, inactive targets get run configurations for products
with the wrong id. These get removed and re-inserted on the next target
switch. The user-visible effect is a suffix "2" alternately appearing
and disappearing on switching kits.

Task-number: QTCREATORBUG-15372
Change-Id: Ib57859103786988d273733680a373a8283295a35
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Christian Kandeler
2016-02-09 12:03:37 +01:00
parent b5987a6d49
commit de2c79044c

View File

@@ -883,8 +883,8 @@ void QbsProject::updateBuildTargetData()
{
updateApplicationTargets();
updateDeploymentInfo();
foreach (Target *t, targets())
t->updateDefaultRunConfigurations();
if (activeTarget())
activeTarget()->updateDefaultRunConfigurations();
}
} // namespace Internal