forked from qt-creator/qt-creator
Create a single parent options page for the Version Control category
Cleans up some duplication for each page. Reviewed-by: Friedemann Kleint
This commit is contained in:
@@ -98,21 +98,6 @@ QString SettingsPage::displayName() const
|
||||
return tr("CVS");
|
||||
}
|
||||
|
||||
QString SettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(VCSBase::Constants::VCS_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("VCSBase", VCSBase::Constants::VCS_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon SettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(); // TODO: Icon for Version Control
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_widget = new SettingsPageWidget(parent);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "ui_settingspage.h"
|
||||
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <vcsbase/vcsbaseoptionspage.h>
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QPointer>
|
||||
@@ -50,6 +50,7 @@ struct CVSSettings;
|
||||
class SettingsPageWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SettingsPageWidget(QWidget *parent = 0);
|
||||
|
||||
@@ -63,7 +64,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class SettingsPage : public Core::IOptionsPage
|
||||
class SettingsPage : public VCSBase::VCSBaseOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -72,9 +73,6 @@ public:
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
|
||||
Reference in New Issue
Block a user