Commit 083325fd authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Vcs: Make VcsConfiguration page trigger on config changes



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

Change-Id: Id906db07165535d4f505c7696e29bb8b9026f840
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent 7b8a8670
......@@ -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()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment