void QbsRunConfiguration::installStepChanged() { if (m_currentInstallStep) disconnect(m_currentInstallStep, SIGNAL(changed()), this, SIGNAL(targetInformationChanged())); if (m_currentBuildStepList) { disconnect(m_currentBuildStepList, SIGNAL(stepInserted(int)), this, SLOT(installStepChanged())); disconnect(m_currentBuildStepList, SIGNAL(stepRemoved(int)), this, SLOT(installStepChanged())); disconnect(m_currentBuildStepList, SIGNAL(stepMoved(int,int)), this, SLOT(installStepChanged())); } QbsDeployConfiguration *activeDc = qobject_cast<QbsDeployConfiguration *>(target()->activeDeployConfiguration()); m_currentBuildStepList = activeDc ? activeDc->stepList() : 0; m_currentInstallStep = activeDc ? activeDc->qbsInstallStep() : 0; if (m_currentInstallStep) connect(m_currentInstallStep, SIGNAL(changed()), this, SIGNAL(targetInformationChanged())); if (m_currentBuildStepList) { connect(m_currentBuildStepList, SIGNAL(stepInserted(int)), this, SLOT(installStepChanged())); connect(m_currentBuildStepList, SIGNAL(stepRemoved(int)), this, SLOT(installStepChanged())); connect(m_currentBuildStepList, SIGNAL(stepMoved(int,int)), this, SLOT(installStepChanged())); } emit targetInformationChanged(); }
void QbsRunConfiguration::installStepChanged() { if (m_currentInstallStep) disconnect(m_currentInstallStep, &QbsInstallStep::changed, this, &QbsRunConfiguration::targetInformationChanged); if (m_currentBuildStepList) { disconnect(m_currentBuildStepList, &BuildStepList::stepInserted, this, &QbsRunConfiguration::installStepChanged); disconnect(m_currentBuildStepList, &BuildStepList::stepRemoved, this, &QbsRunConfiguration::installStepChanged); disconnect(m_currentBuildStepList, &BuildStepList::stepMoved, this, &QbsRunConfiguration::installStepChanged); } QbsDeployConfiguration *activeDc = qobject_cast<QbsDeployConfiguration *>(target()->activeDeployConfiguration()); m_currentBuildStepList = activeDc ? activeDc->stepList() : 0; m_currentInstallStep = activeDc ? activeDc->qbsInstallStep() : 0; if (m_currentInstallStep) connect(m_currentInstallStep, &QbsInstallStep::changed, this, &QbsRunConfiguration::targetInformationChanged); if (m_currentBuildStepList) { connect(m_currentBuildStepList, &BuildStepList::stepInserted, this, &QbsRunConfiguration::installStepChanged); connect(m_currentBuildStepList, &BuildStepList::aboutToRemoveStep, this, &QbsRunConfiguration::installStepToBeRemoved); connect(m_currentBuildStepList, &BuildStepList::stepRemoved, this, &QbsRunConfiguration::installStepChanged); connect(m_currentBuildStepList, &BuildStepList::stepMoved, this, &QbsRunConfiguration::installStepChanged); } emit targetInformationChanged(); }