diff options
author | hjk <qtc-committer@nokia.com> | 2012-05-22 11:17:13 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@nokia.com> | 2012-05-23 10:48:04 +0200 |
commit | f77cd29e54f832cbb72533842acb4dda655540f1 (patch) | |
tree | e6557c80b3c1875fb0c7b215919b3fa5bee97d1c /src/plugins/git | |
parent | 444445ceb3cef3f406ae6e68ee5c2505de2762cc (diff) | |
download | qt-creator-f77cd29e54f832cbb72533842acb4dda655540f1.tar.gz |
IOptionsPage: replace virtual fuctions by data members
Change-Id: I8297df85109b67b79f90c33263a5dc7b89efbb60
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/git')
-rw-r--r-- | src/plugins/git/gerrit/gerritoptionspage.cpp | 6 | ||||
-rw-r--r-- | src/plugins/git/gerrit/gerritoptionspage.h | 9 | ||||
-rw-r--r-- | src/plugins/git/settingspage.cpp | 12 | ||||
-rw-r--r-- | src/plugins/git/settingspage.h | 2 |
4 files changed, 10 insertions, 19 deletions
diff --git a/src/plugins/git/gerrit/gerritoptionspage.cpp b/src/plugins/git/gerrit/gerritoptionspage.cpp index ed9acf5ad0..80c92817b6 100644 --- a/src/plugins/git/gerrit/gerritoptionspage.cpp +++ b/src/plugins/git/gerrit/gerritoptionspage.cpp @@ -50,11 +50,13 @@ GerritOptionsPage::GerritOptionsPage(const QSharedPointer<GerritParameters> &p, : VcsBase::VcsBaseOptionsPage(parent) , m_parameters(p) { + setId(optionsId()); + setDisplayName(tr("Gerrit")); } -QString GerritOptionsPage::displayName() const +QString GerritOptionsPage::optionsId() { - return tr("Gerrit"); + return QLatin1String("Gerrit"); } QWidget *GerritOptionsPage::createPage(QWidget *parent) diff --git a/src/plugins/git/gerrit/gerritoptionspage.h b/src/plugins/git/gerrit/gerritoptionspage.h index 066e5f121d..37486dfb71 100644 --- a/src/plugins/git/gerrit/gerritoptionspage.h +++ b/src/plugins/git/gerrit/gerritoptionspage.h @@ -73,20 +73,17 @@ private: class GerritOptionsPage : public VcsBase::VcsBaseOptionsPage { Q_OBJECT + public: GerritOptionsPage(const QSharedPointer<GerritParameters> &p, QObject *parent = 0); - static QString optionsId() { return QLatin1String("Gerrit"); } - - QString id() const { return optionsId(); } - QString displayName() const; + static QString optionsId(); QWidget *createPage(QWidget *parent); void apply(); void finish() { } - - virtual bool matches(const QString &) const; + bool matches(const QString &) const; private: const QSharedPointer<GerritParameters> &m_parameters; diff --git a/src/plugins/git/settingspage.cpp b/src/plugins/git/settingspage.cpp index 5c023a3358..bbc1b6369b 100644 --- a/src/plugins/git/settingspage.cpp +++ b/src/plugins/git/settingspage.cpp @@ -121,16 +121,8 @@ QString SettingsPageWidget::searchKeywords() const SettingsPage::SettingsPage() : m_widget(0) { -} - -QString SettingsPage::id() const -{ - return QLatin1String(VcsBase::Constants::VCS_ID_GIT); -} - -QString SettingsPage::displayName() const -{ - return tr("Git"); + setId(QLatin1String(VcsBase::Constants::VCS_ID_GIT)); + setDisplayName(tr("Git")); } QWidget *SettingsPage::createPage(QWidget *parent) diff --git a/src/plugins/git/settingspage.h b/src/plugins/git/settingspage.h index 28f178d2ad..01be4a9203 100644 --- a/src/plugins/git/settingspage.h +++ b/src/plugins/git/settingspage.h @@ -76,7 +76,7 @@ public: QWidget *createPage(QWidget *parent); void apply(); void finish() { } - virtual bool matches(const QString &) const; + bool matches(const QString &) const; private: QString m_searchKeywords; |