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:
		@@ -112,21 +112,6 @@ QString SettingsPage::displayName() const
 | 
			
		||||
    return tr("Git");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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);
 | 
			
		||||
 
 | 
			
		||||
@@ -33,7 +33,7 @@
 | 
			
		||||
#include <QtGui/QWidget>
 | 
			
		||||
#include <QtCore/QPointer>
 | 
			
		||||
 | 
			
		||||
#include <coreplugin/dialogs/ioptionspage.h>
 | 
			
		||||
#include <vcsbase/vcsbaseoptionspage.h>
 | 
			
		||||
 | 
			
		||||
#include "ui_settingspage.h"
 | 
			
		||||
 | 
			
		||||
@@ -63,7 +63,7 @@ private:
 | 
			
		||||
    Ui::SettingsPage m_ui;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class SettingsPage : public Core::IOptionsPage
 | 
			
		||||
class SettingsPage : public VCSBase::VCSBaseOptionsPage
 | 
			
		||||
{
 | 
			
		||||
    Q_OBJECT
 | 
			
		||||
 | 
			
		||||
@@ -72,9 +72,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