aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vcsbase
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-05-04 14:20:11 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-05-04 15:26:41 +0000
commit083325fd1c629f7df1c8dd7c57aaef1ab58b0080 (patch)
treeb74718070f90901ae1a982ea0c7305b0b8530f3c /src/plugins/vcsbase
parent7b8a867011963edb59b9f52d51ede9c557876d95 (diff)
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>
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r--src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp b/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp
index c12703e661..94f14677fc 100644
--- a/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp
+++ b/src/plugins/vcsbase/wizard/vcsconfigurationpage.cpp
@@ -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()));