Vcs: Move Settings widget definitions to .cpp files

In preparation of replacing the VcsBase* layer by the new
IOption* functions, which are almost the same now.

Change-Id: I39f7da137434ed33d2d42f09f4213e74b3e29f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
hjk
2020-01-10 18:07:32 +01:00
parent 1b9f0a6d91
commit fbfba64f10
10 changed files with 115 additions and 141 deletions

View File

@@ -28,6 +28,8 @@
#include "gitplugin.h"
#include "gitclient.h"
#include "ui_settingspage.h"
#include <coreplugin/icore.h>
#include <coreplugin/messagebox.h>
#include <vcsbase/vcsbaseconstants.h>
@@ -36,14 +38,28 @@
#include <utils/hostosinfo.h>
#include <QDir>
#include <QDebug>
#include <QTextStream>
using namespace VcsBase;
namespace Git {
namespace Internal {
class SettingsPageWidget final : public VcsBase::VcsClientOptionsPageWidget
{
Q_DECLARE_TR_FUNCTIONS(Git::Internal::SettingsPageWidget)
public:
SettingsPageWidget();
VcsBase::VcsBaseClientSettings settings() const final;
void setSettings(const VcsBase::VcsBaseClientSettings &s) final;
private:
void updateNoteField();
Ui::SettingsPage m_ui;
};
SettingsPageWidget::SettingsPageWidget()
{
m_ui.setupUi(this);
@@ -106,12 +122,13 @@ void SettingsPageWidget::updateNoteField()
}
// -------- SettingsPage
SettingsPage::SettingsPage(Core::IVersionControl *control, QObject *parent) :
VcsClientOptionsPage(control, GitPlugin::client(), parent)
{
setId(VcsBase::Constants::VCS_ID_GIT);
setDisplayName(tr("Git"));
setWidgetFactory([]() { return new SettingsPageWidget; });
setDisplayName(SettingsPageWidget::tr("Git"));
setWidgetFactory([] { return new SettingsPageWidget; });
}
void SettingsPage::apply()