forked from qt-creator/qt-creator
Vcs: Dissolve VcsBaseOptionsPage intermediate hierarchy level
It's effectively setting only three properties nowadays, not enough to justify a case of reuse-by-inheritance anymore. Change-Id: Ia0aedbd0dc460a70bed580a3402cf928c7221a77 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#include <coreplugin/icore.h>
|
||||
#include <utils/pathchooser.h>
|
||||
|
||||
#include <vcsbase/vcsbaseconstants.h>
|
||||
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
#include <QCheckBox>
|
||||
@@ -40,11 +42,12 @@ namespace Internal {
|
||||
|
||||
GerritOptionsPage::GerritOptionsPage(const QSharedPointer<GerritParameters> &p,
|
||||
QObject *parent)
|
||||
: VcsBase::VcsBaseOptionsPage(parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
, m_parameters(p)
|
||||
{
|
||||
setId("Gerrit");
|
||||
setDisplayName(tr("Gerrit"));
|
||||
setCategory(VcsBase::Constants::VCS_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
GerritOptionsPage::~GerritOptionsPage()
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vcsbase/vcsbaseoptionspage.h>
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
|
||||
#include <QWidget>
|
||||
#include <QSharedPointer>
|
||||
#include <QPointer>
|
||||
|
||||
@@ -61,7 +60,7 @@ private:
|
||||
QCheckBox *m_httpsCheckBox;
|
||||
};
|
||||
|
||||
class GerritOptionsPage : public VcsBase::VcsBaseOptionsPage
|
||||
class GerritOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ SettingsPage::SettingsPage(Core::IVersionControl *control, QObject *parent) :
|
||||
{
|
||||
setId(VcsBase::Constants::VCS_ID_GIT);
|
||||
setDisplayName(SettingsPageWidget::tr("Git"));
|
||||
setCategory(VcsBase::Constants::VCS_SETTINGS_CATEGORY);
|
||||
setWidgetFactory([] { return new SettingsPageWidget; });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user