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()
{
const QList<DeployConfiguration *> &deployConfigs
= target()->deployConfigurations();
DeployConfiguration * const activeDeployConf
= 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
= MaemoGlobal::earlierBuildStep<AbstractMaemoDeployStep>(deployConfigs.at(i), 0);
if (!step)
continue;
if (deployConfigs.at(i) == activeDeployConf) {
= MaemoGlobal::earlierBuildStep<AbstractMaemoDeployStep>(activeDeployConf, 0);
if (step) {
connect(step, SIGNAL(deviceConfigChanged()),
SLOT(updateDeviceConfigurations()));
} else {
disconnect(step, 0, this,
SLOT(updateDeviceConfigurations()));
SLOT(updateDeviceConfigurations()), Qt::UniqueConnection);
}
}
updateDeviceConfigurations();
updateFactoryState();
}