aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/vcsbase
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2020-01-24 16:24:31 +0100
committerhjk <hjk@qt.io>2020-01-27 06:44:55 +0000
commitb0939414354589ae569f12a14e6fe55abb4ab575 (patch)
treec4daec2d42e09b620d32ca87949aae40e9f67319 /src/plugins/vcsbase
parent004614f6db033059a4703383bff25cc91d4fe7e2 (diff)
Vcs: Drop VcsBaseOptionsPage hierarchy level
Adapt the remaining users: Cvs,Git,Svn. Change-Id: Idd730a33e5c64d18002b1a21b5f5c715b7fa5ffb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r--src/plugins/vcsbase/CMakeLists.txt1
-rw-r--r--src/plugins/vcsbase/vcsbase.pro2
-rw-r--r--src/plugins/vcsbase/vcsbase.qbs2
-rw-r--r--src/plugins/vcsbase/vcsbaseoptionspage.cpp91
-rw-r--r--src/plugins/vcsbase/vcsbaseoptionspage.h78
5 files changed, 0 insertions, 174 deletions
diff --git a/src/plugins/vcsbase/CMakeLists.txt b/src/plugins/vcsbase/CMakeLists.txt
index 1cffe26be0..465cd5ee32 100644
--- a/src/plugins/vcsbase/CMakeLists.txt
+++ b/src/plugins/vcsbase/CMakeLists.txt
@@ -22,7 +22,6 @@ add_qtc_plugin(VcsBase
vcsbasediffeditorcontroller.cpp vcsbasediffeditorcontroller.h
vcsbaseeditor.cpp vcsbaseeditor.h
vcsbaseeditorconfig.cpp vcsbaseeditorconfig.h
- vcsbaseoptionspage.cpp vcsbaseoptionspage.h
vcsbaseplugin.cpp vcsbaseplugin.h
vcsbasesubmiteditor.cpp vcsbasesubmiteditor.h
vcscommand.cpp vcscommand.h
diff --git a/src/plugins/vcsbase/vcsbase.pro b/src/plugins/vcsbase/vcsbase.pro
index 23259021d8..2a1dd0a6bc 100644
--- a/src/plugins/vcsbase/vcsbase.pro
+++ b/src/plugins/vcsbase/vcsbase.pro
@@ -20,7 +20,6 @@ HEADERS += vcsbase_global.h \
nicknamedialog.h \
vcsoutputwindow.h \
cleandialog.h \
- vcsbaseoptionspage.h \
vcscommand.h \
vcsbaseclient.h \
vcsbaseclientsettings.h \
@@ -47,7 +46,6 @@ SOURCES += vcsplugin.cpp \
nicknamedialog.cpp \
vcsoutputwindow.cpp \
cleandialog.cpp \
- vcsbaseoptionspage.cpp \
vcscommand.cpp \
vcsbaseclient.cpp \
vcsbaseclientsettings.cpp \
diff --git a/src/plugins/vcsbase/vcsbase.qbs b/src/plugins/vcsbase/vcsbase.qbs
index df5686db5c..2ab9860447 100644
--- a/src/plugins/vcsbase/vcsbase.qbs
+++ b/src/plugins/vcsbase/vcsbase.qbs
@@ -60,8 +60,6 @@ QtcPlugin {
"vcsbaseeditor.h",
"vcsbaseeditorconfig.cpp",
"vcsbaseeditorconfig.h",
- "vcsbaseoptionspage.cpp",
- "vcsbaseoptionspage.h",
"vcsbaseplugin.cpp",
"vcsbaseplugin.h",
"vcsbasesubmiteditor.cpp",
diff --git a/src/plugins/vcsbase/vcsbaseoptionspage.cpp b/src/plugins/vcsbase/vcsbaseoptionspage.cpp
deleted file mode 100644
index 2d2ea962eb..0000000000
--- a/src/plugins/vcsbase/vcsbaseoptionspage.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#include "vcsbaseoptionspage.h"
-
-#include "vcsbaseclient.h"
-#include "vcsbaseconstants.h"
-
-#include <coreplugin/icore.h>
-#include <coreplugin/iversioncontrol.h>
-
-#include <utils/qtcassert.h>
-
-#include <QCoreApplication>
-
-/*!
- \class VcsBase::VcsBaseOptionsPage
-
- \brief The VcsBaseOptionsPage class is the base class for VCS options pages
- providing a common category and icon.
- */
-
-namespace VcsBase {
-
-VcsClientOptionsPageWidget::VcsClientOptionsPageWidget() = default;
-
-VcsClientOptionsPage::VcsClientOptionsPage(Core::IVersionControl *control, VcsBaseClientSettings *settings,
- QObject *parent) :
- Core::IOptionsPage(parent),
- m_settings(settings)
-{
- QTC_CHECK(m_settings);
- connect(this, &VcsClientOptionsPage::settingsChanged,
- control, &Core::IVersionControl::configurationChanged);
-}
-
-void VcsClientOptionsPage::setWidgetFactory(VcsClientOptionsPage::WidgetFactory factory)
-{
- QTC_ASSERT(!m_factory, return);
- m_factory = factory;
-}
-
-VcsClientOptionsPageWidget *VcsClientOptionsPage::widget()
-{
- QTC_ASSERT(m_factory, return nullptr);
- if (!m_widget)
- m_widget = m_factory();
- QTC_ASSERT(m_widget, return nullptr);
- m_widget->setSettings(*m_settings);
- return m_widget;
-}
-
-void VcsClientOptionsPage::apply()
-{
- QTC_ASSERT(m_widget, return);
- const VcsBaseClientSettings newSettings = m_widget->settings();
- if (*m_settings != newSettings) {
- *m_settings = newSettings;
- emit settingsChanged();
- }
-}
-
-void VcsClientOptionsPage::finish()
-{
- delete m_widget;
- m_widget = nullptr;
-}
-
-} // namespace VcsBase
diff --git a/src/plugins/vcsbase/vcsbaseoptionspage.h b/src/plugins/vcsbase/vcsbaseoptionspage.h
deleted file mode 100644
index c4f5567b6c..0000000000
--- a/src/plugins/vcsbase/vcsbaseoptionspage.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-****************************************************************************/
-
-#pragma once
-
-#include "vcsbase_global.h"
-
-#include "vcsbaseclientsettings.h"
-
-#include <coreplugin/dialogs/ioptionspage.h>
-
-#include <functional>
-
-namespace Core { class IVersionControl; }
-
-namespace VcsBase {
-
-class VCSBASE_EXPORT VcsClientOptionsPageWidget : public Core::IOptionsPageWidget
-{
- Q_OBJECT
-
-public:
- VcsClientOptionsPageWidget();
-
- void apply() override {}
-
- virtual void setSettings(const VcsBaseClientSettings &s) = 0;
- virtual VcsBaseClientSettings settings() const = 0;
-};
-
-class VCSBASE_EXPORT VcsClientOptionsPage : public Core::IOptionsPage
-{
- Q_OBJECT
-
-public:
- using WidgetFactory = std::function<VcsClientOptionsPageWidget *()>;
-
- explicit VcsClientOptionsPage(Core::IVersionControl *control, VcsBaseClientSettings *settings, QObject *parent = nullptr);
-
- VcsClientOptionsPageWidget *widget() override;
- void apply() override;
- void finish() override;
-
-signals:
- void settingsChanged();
-
-protected:
- void setWidgetFactory(WidgetFactory factory);
-
-private:
- WidgetFactory m_factory;
- VcsClientOptionsPageWidget *m_widget = nullptr;
- VcsBaseClientSettings *const m_settings;
-};
-
-} // namespace VcsBase