forked from qt-creator/qt-creator
Maemo: Better detection of deployconfig changes relevant to runconfig.
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user