Maemo: Better detection of deployconfig changes relevant to runconfig.

This commit is contained in:
Christian Kandeler
2011-04-07 16:18:57 +02:00
parent dc3ec71ab0
commit e96a029a7d

View File

@@ -354,23 +354,25 @@ void MaemoRunConfiguration::updateDeviceConfigurations()
void MaemoRunConfiguration::handleDeployConfigChanged() void MaemoRunConfiguration::handleDeployConfigChanged()
{ {
const QList<DeployConfiguration *> &deployConfigs
= target()->deployConfigurations();
DeployConfiguration * const activeDeployConf DeployConfiguration * const activeDeployConf
= target()->activeDeployConfiguration(); = target()->activeDeployConfiguration();
for (int i = 0; i < deployConfigs.count(); ++i) { if (activeDeployConf) {
connect(activeDeployConf->stepList(), SIGNAL(stepInserted(int)),
SLOT(handleDeployConfigChanged()), Qt::UniqueConnection);
connect(activeDeployConf->stepList(), SIGNAL(stepInserted(int)),
SLOT(handleDeployConfigChanged()), Qt::UniqueConnection);
connect(activeDeployConf->stepList(), SIGNAL(stepMoved(int,int)),
SLOT(handleDeployConfigChanged()), Qt::UniqueConnection);
connect(activeDeployConf->stepList(), SIGNAL(stepRemoved(int)),
SLOT(handleDeployConfigChanged()), Qt::UniqueConnection);
AbstractMaemoDeployStep * const step AbstractMaemoDeployStep * const step
= MaemoGlobal::earlierBuildStep<AbstractMaemoDeployStep>(deployConfigs.at(i), 0); = MaemoGlobal::earlierBuildStep<AbstractMaemoDeployStep>(activeDeployConf, 0);
if (!step) if (step) {
continue;
if (deployConfigs.at(i) == activeDeployConf) {
connect(step, SIGNAL(deviceConfigChanged()), connect(step, SIGNAL(deviceConfigChanged()),
SLOT(updateDeviceConfigurations())); SLOT(updateDeviceConfigurations()), Qt::UniqueConnection);
} else {
disconnect(step, 0, this,
SLOT(updateDeviceConfigurations()));
} }
} }
updateDeviceConfigurations(); updateDeviceConfigurations();
updateFactoryState(); updateFactoryState();
} }