Vcs: Make VcsConfiguration page trigger on config changes

... when used with an vcsId instead of with an IVersionControl.

Change-Id: Id906db07165535d4f505c7696e29bb8b9026f840
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-05-04 14:20:11 +02:00
parent 7b8a867011
commit 083325fd1c

View File

@@ -118,8 +118,6 @@ VcsConfigurationPage::VcsConfigurationPage() : d(new Internal::VcsConfigurationP
auto verticalLayout = new QVBoxLayout(this);
verticalLayout->addWidget(d->m_configureButton);
connect(d->m_versionControl, &IVersionControl::configurationChanged,
this, &QWizardPage::completeChanged);
connect(d->m_configureButton, &QAbstractButton::clicked,
this, &VcsConfigurationPage::openConfiguration);
}
@@ -145,6 +143,11 @@ void VcsConfigurationPage::setVersionControlId(const QString &id)
void VcsConfigurationPage::initializePage()
{
if (d->m_versionControl) {
disconnect(d->m_versionControl, &IVersionControl::configurationChanged,
this, &QWizardPage::completeChanged);
}
if (!d->m_versionControlId.isEmpty()) {
auto jw = qobject_cast<JsonWizard *>(wizard());
if (!jw) {
@@ -167,6 +170,9 @@ void VcsConfigurationPage::initializePage()
}
}
connect(d->m_versionControl, &IVersionControl::configurationChanged,
this, &QWizardPage::completeChanged);
d->m_configureButton->setEnabled(d->m_versionControl);
if (d->m_versionControl)
setSubTitle(tr("Please configure <b>%1</b> now.").arg(d->m_versionControl->displayName()));