diff options
Diffstat (limited to 'src/plugins/vcsbase')
-rw-r--r-- | src/plugins/vcsbase/commonsettingspage.cpp (renamed from src/plugins/vcsbase/vcsbasesettingspage.cpp) | 48 | ||||
-rw-r--r-- | src/plugins/vcsbase/commonsettingspage.h (renamed from src/plugins/vcsbase/vcsbasesettingspage.h) | 38 | ||||
-rw-r--r-- | src/plugins/vcsbase/commonsettingspage.ui (renamed from src/plugins/vcsbase/vcsbasesettingspage.ui) | 97 | ||||
-rw-r--r-- | src/plugins/vcsbase/commonvcssettings.cpp (renamed from src/plugins/vcsbase/vcsbasesettings.cpp) | 17 | ||||
-rw-r--r-- | src/plugins/vcsbase/commonvcssettings.h (renamed from src/plugins/vcsbase/vcsbasesettings.h) | 20 | ||||
-rw-r--r-- | src/plugins/vcsbase/vcsbase.pro | 10 | ||||
-rw-r--r-- | src/plugins/vcsbase/vcsbasesubmiteditor.cpp | 11 | ||||
-rw-r--r-- | src/plugins/vcsbase/vcsbasesubmiteditor.h | 4 | ||||
-rw-r--r-- | src/plugins/vcsbase/vcsplugin.cpp | 16 | ||||
-rw-r--r-- | src/plugins/vcsbase/vcsplugin.h | 10 |
10 files changed, 149 insertions, 122 deletions
diff --git a/src/plugins/vcsbase/vcsbasesettingspage.cpp b/src/plugins/vcsbase/commonsettingspage.cpp index 5b52fbe20e..b300c95062 100644 --- a/src/plugins/vcsbase/vcsbasesettingspage.cpp +++ b/src/plugins/vcsbase/commonsettingspage.cpp @@ -27,11 +27,11 @@ ** **************************************************************************/ -#include "vcsbasesettingspage.h" +#include "commonsettingspage.h" #include "vcsbaseconstants.h" #include "nicknamedialog.h" -#include "ui_vcsbasesettingspage.h" +#include "ui_commonsettingspage.h" #include <coreplugin/icore.h> #include <extensionsystem/pluginmanager.h> @@ -45,9 +45,9 @@ namespace Internal { // ------------------ VCSBaseSettingsWidget -VCSBaseSettingsWidget::VCSBaseSettingsWidget(QWidget *parent) : +CommonSettingsWidget::CommonSettingsWidget(QWidget *parent) : QWidget(parent), - m_ui(new Ui::VCSBaseSettingsPage) + m_ui(new Ui::CommonSettingsPage) { m_ui->setupUi(this); m_ui->submitMessageCheckScriptChooser->setExpectedKind(Utils::PathChooser::Command); @@ -55,14 +55,14 @@ VCSBaseSettingsWidget::VCSBaseSettingsWidget(QWidget *parent) : m_ui->nickNameMailMapChooser->setExpectedKind(Utils::PathChooser::File); } -VCSBaseSettingsWidget::~VCSBaseSettingsWidget() +CommonSettingsWidget::~CommonSettingsWidget() { delete m_ui; } -VCSBaseSettings VCSBaseSettingsWidget::settings() const +CommonVcsSettings CommonSettingsWidget::settings() const { - VCSBaseSettings rc; + CommonVcsSettings rc; rc.nickNameMailMap = m_ui->nickNameMailMapChooser->path(); rc.nickNameFieldListFile = m_ui->nickNameFieldsFileChooser->path(); rc.submitMessageCheckScript = m_ui->submitMessageCheckScriptChooser->path(); @@ -71,7 +71,7 @@ VCSBaseSettings VCSBaseSettingsWidget::settings() const return rc; } -void VCSBaseSettingsWidget::setSettings(const VCSBaseSettings &s) +void CommonSettingsWidget::setSettings(const CommonVcsSettings &s) { m_ui->nickNameMailMapChooser->setPath(s.nickNameMailMap); m_ui->nickNameFieldsFileChooser->setPath(s.nickNameFieldListFile); @@ -80,7 +80,7 @@ void VCSBaseSettingsWidget::setSettings(const VCSBaseSettings &s) m_ui->lineWrapSpinBox->setValue(s.lineWrapWidth); } -QString VCSBaseSettingsWidget::searchKeyWordMatchString() const +QString CommonSettingsWidget::searchKeyWordMatchString() const { const QChar blank = QLatin1Char(' '); QString rc = m_ui->submitMessageCheckScriptLabel->text(); @@ -93,58 +93,58 @@ QString VCSBaseSettingsWidget::searchKeyWordMatchString() const } // --------------- VCSBaseSettingsPage -VCSBaseSettingsPage::VCSBaseSettingsPage(QObject *parent) : +CommonOptionsPage::CommonOptionsPage(QObject *parent) : Core::IOptionsPage(parent) { m_settings.fromSettings(Core::ICore::instance()->settings()); } -void VCSBaseSettingsPage::updateNickNames() +void CommonOptionsPage::updateNickNames() { } -VCSBaseSettingsPage::~VCSBaseSettingsPage() +CommonOptionsPage::~CommonOptionsPage() { } -QString VCSBaseSettingsPage::id() const +QString CommonOptionsPage::id() const { return QLatin1String(Constants::VCS_COMMON_SETTINGS_ID); } -QString VCSBaseSettingsPage::displayName() const +QString CommonOptionsPage::displayName() const { return QCoreApplication::translate("VCSBase", Constants::VCS_COMMON_SETTINGS_NAME); } -QString VCSBaseSettingsPage::category() const +QString CommonOptionsPage::category() const { return QLatin1String(Constants::VCS_SETTINGS_CATEGORY); } -QString VCSBaseSettingsPage::displayCategory() const +QString CommonOptionsPage::displayCategory() const { return QCoreApplication::translate("VCSBase", Constants::VCS_SETTINGS_TR_CATEGORY); } -QIcon VCSBaseSettingsPage::categoryIcon() const +QIcon CommonOptionsPage::categoryIcon() const { return QIcon(); // TODO: Icon for Version Control } -QWidget *VCSBaseSettingsPage::createPage(QWidget *parent) +QWidget *CommonOptionsPage::createPage(QWidget *parent) { - m_widget = new VCSBaseSettingsWidget(parent); + m_widget = new CommonSettingsWidget(parent); m_widget->setSettings(m_settings); if (m_searchKeyWords.isEmpty()) m_searchKeyWords = m_widget->searchKeyWordMatchString(); return m_widget; } -void VCSBaseSettingsPage::apply() +void CommonOptionsPage::apply() { if (m_widget) { - const VCSBaseSettings newSettings = m_widget->settings(); + const CommonVcsSettings newSettings = m_widget->settings(); if (newSettings != m_settings) { m_settings = newSettings; m_settings.toSettings(Core::ICore::instance()->settings()); @@ -153,10 +153,10 @@ void VCSBaseSettingsPage::apply() } } -bool VCSBaseSettingsPage::matches(const QString &key) const +bool CommonOptionsPage::matches(const QString &key) const { return m_searchKeyWords.contains(key, Qt::CaseInsensitive); } -} -} +} // namespace Internal +} // namespace VCSBase diff --git a/src/plugins/vcsbase/vcsbasesettingspage.h b/src/plugins/vcsbase/commonsettingspage.h index 5828b5bf88..ea47876029 100644 --- a/src/plugins/vcsbase/vcsbasesettingspage.h +++ b/src/plugins/vcsbase/commonsettingspage.h @@ -27,44 +27,46 @@ ** **************************************************************************/ -#ifndef VCSBASESETTINGSPAGE_H -#define VCSBASESETTINGSPAGE_H +#ifndef COMMONOPTIONSPAGE_H +#define COMMONOPTIONSPAGE_H + +#include "commonvcssettings.h" -#include "vcsbasesettings.h" #include <coreplugin/dialogs/ioptionspage.h> #include <QtCore/QPointer> #include <QtGui/QWidget> QT_BEGIN_NAMESPACE namespace Ui { - class VCSBaseSettingsPage; +class CommonSettingsPage; } QT_END_NAMESPACE namespace VCSBase { namespace Internal { -class VCSBaseSettingsWidget : public QWidget { +class CommonSettingsWidget : public QWidget +{ Q_OBJECT public: - explicit VCSBaseSettingsWidget(QWidget *parent = 0); - virtual ~VCSBaseSettingsWidget(); + explicit CommonSettingsWidget(QWidget *parent = 0); + virtual ~CommonSettingsWidget(); - VCSBaseSettings settings() const; - void setSettings(const VCSBaseSettings &s); + CommonVcsSettings settings() const; + void setSettings(const CommonVcsSettings &s); QString searchKeyWordMatchString() const; private: - Ui::VCSBaseSettingsPage *m_ui; + Ui::CommonSettingsPage *m_ui; }; -class VCSBaseSettingsPage : public Core::IOptionsPage +class CommonOptionsPage : public Core::IOptionsPage { Q_OBJECT public: - explicit VCSBaseSettingsPage(QObject *parent = 0); - virtual ~VCSBaseSettingsPage(); + explicit CommonOptionsPage(QObject *parent = 0); + virtual ~CommonOptionsPage(); virtual QString id() const; virtual QString displayName() const; @@ -77,20 +79,20 @@ public: virtual void finish() { } virtual bool matches(const QString &key) const; - VCSBaseSettings settings() const { return m_settings; } + CommonVcsSettings settings() const { return m_settings; } signals: - void settingsChanged(const VCSBase::Internal::VCSBaseSettings &s); + void settingsChanged(const VCSBase::Internal::CommonVcsSettings &s); private: void updateNickNames(); - VCSBaseSettingsWidget* m_widget; - VCSBaseSettings m_settings; + CommonSettingsWidget* m_widget; + CommonVcsSettings m_settings; QString m_searchKeyWords; }; } // namespace Internal } // namespace VCSBase -#endif // VCSBASESETTINGSPAGE_H +#endif // COMMONOPTIONSPAGE_H diff --git a/src/plugins/vcsbase/vcsbasesettingspage.ui b/src/plugins/vcsbase/commonsettingspage.ui index 6c442cbe5c..e1ff7cb652 100644 --- a/src/plugins/vcsbase/vcsbasesettingspage.ui +++ b/src/plugins/vcsbase/commonsettingspage.ui @@ -1,14 +1,61 @@ <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> - <class>VCSBaseSettingsPage</class> - <widget class="QWidget" name="VCSBaseSettingsPage"> + <class>CommonSettingsPage</class> + <widget class="QWidget" name="CommonSettingsPage"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>408</width> + <height>148</height> + </rect> + </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QGroupBox" name="commonGroupBox"> - <layout class="QFormLayout" name="formLayout"> - <property name="rowWrapPolicy"> - <enum>QFormLayout::WrapLongRows</enum> - </property> + <property name="title"> + <string>Common Settings</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QCheckBox" name="lineWrapCheckBox"> + <property name="text"> + <string>Wrap submit message at:</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QSpinBox" name="lineWrapSpinBox"> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="suffix"> + <string> characters</string> + </property> + <property name="minimum"> + <number>40</number> + </property> + <property name="maximum"> + <number>200</number> + </property> + <property name="value"> + <number>72</number> + </property> + </widget> + </item> + <item row="0" column="2"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> <item row="1" column="0"> <widget class="QLabel" name="submitMessageCheckScriptLabel"> <property name="toolTip"> @@ -19,8 +66,8 @@ </property> </widget> </item> - <item row="1" column="1"> - <widget class="Utils::PathChooser" name="submitMessageCheckScriptChooser"/> + <item row="1" column="1" colspan="2"> + <widget class="Utils::PathChooser" name="submitMessageCheckScriptChooser" native="true"/> </item> <item row="2" column="0"> <widget class="QLabel" name="nickNameMailMapLabel"> @@ -33,8 +80,8 @@ name <email> alias <email></string> </property> </widget> </item> - <item row="2" column="1"> - <widget class="Utils::PathChooser" name="nickNameMailMapChooser"/> + <item row="2" column="1" colspan="2"> + <widget class="Utils::PathChooser" name="nickNameMailMapChooser" native="true"/> </item> <item row="3" column="0"> <widget class="QLabel" name="nickNameFieldsFileLabel"> @@ -46,34 +93,8 @@ name <email> alias <email></string> </property> </widget> </item> - <item row="3" column="1"> - <widget class="Utils::PathChooser" name="nickNameFieldsFileChooser"/> - </item> - <item row="0" column="0"> - <widget class="QCheckBox" name="lineWrapCheckBox"> - <property name="text"> - <string>Wrap submit message at:</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QSpinBox" name="lineWrapSpinBox"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="suffix"> - <string> characters</string> - </property> - <property name="minimum"> - <number>40</number> - </property> - <property name="maximum"> - <number>200</number> - </property> - <property name="value"> - <number>72</number> - </property> - </widget> + <item row="3" column="1" colspan="2"> + <widget class="Utils::PathChooser" name="nickNameFieldsFileChooser" native="true"/> </item> </layout> </widget> diff --git a/src/plugins/vcsbase/vcsbasesettings.cpp b/src/plugins/vcsbase/commonvcssettings.cpp index 249f65aa7f..95186a23fc 100644 --- a/src/plugins/vcsbase/vcsbasesettings.cpp +++ b/src/plugins/vcsbase/commonvcssettings.cpp @@ -27,7 +27,7 @@ ** **************************************************************************/ -#include "vcsbasesettings.h" +#include "commonvcssettings.h" #include <QtCore/QSettings> #include <QtCore/QDebug> @@ -45,13 +45,13 @@ static const bool lineWrapDefault = true; namespace VCSBase { namespace Internal { -VCSBaseSettings::VCSBaseSettings() : +CommonVcsSettings::CommonVcsSettings() : lineWrap(lineWrapDefault), lineWrapWidth(lineWrapWidthDefault) { } -void VCSBaseSettings::toSettings(QSettings *s) const +void CommonVcsSettings::toSettings(QSettings *s) const { s->beginGroup(QLatin1String(settingsGroupC)); s->setValue(QLatin1String(nickNameMailMapKeyC), nickNameMailMap); @@ -62,7 +62,7 @@ void VCSBaseSettings::toSettings(QSettings *s) const s->endGroup(); } -void VCSBaseSettings::fromSettings(QSettings *s) +void CommonVcsSettings::fromSettings(QSettings *s) { s->beginGroup(QLatin1String(settingsGroupC)); nickNameMailMap = s->value(QLatin1String(nickNameMailMapKeyC), QString()).toString(); @@ -73,7 +73,7 @@ void VCSBaseSettings::fromSettings(QSettings *s) s->endGroup(); } -bool VCSBaseSettings::equals(const VCSBaseSettings &rhs) const +bool CommonVcsSettings::equals(const CommonVcsSettings &rhs) const { return lineWrap == rhs.lineWrap && lineWrapWidth == rhs.lineWrapWidth @@ -82,7 +82,7 @@ bool VCSBaseSettings::equals(const VCSBaseSettings &rhs) const && submitMessageCheckScript == rhs.submitMessageCheckScript; } -QDebug operator<<(QDebug d,const VCSBaseSettings& s) +QDebug operator<<(QDebug d,const CommonVcsSettings& s) { d.nospace() << " lineWrap=" << s.lineWrap << " lineWrapWidth=" << s.lineWrapWidth @@ -91,5 +91,6 @@ QDebug operator<<(QDebug d,const VCSBaseSettings& s) << "'submitMessageCheckScript='" << s.submitMessageCheckScript << "'\n"; return d; } -} -} + +} // namespace Internal +} // namespace VCSBase diff --git a/src/plugins/vcsbase/vcsbasesettings.h b/src/plugins/vcsbase/commonvcssettings.h index 843c28b6ae..985683d28d 100644 --- a/src/plugins/vcsbase/vcsbasesettings.h +++ b/src/plugins/vcsbase/commonvcssettings.h @@ -27,8 +27,8 @@ ** **************************************************************************/ -#ifndef VCSBASESETTINGS_H -#define VCSBASESETTINGS_H +#ifndef COMMONVCSSETTINGS_H +#define COMMONVCSSETTINGS_H #include <QtCore/QString> #include <QtGui/QWidget> @@ -42,8 +42,9 @@ namespace VCSBase { namespace Internal { // Common VCS settings, message check script and user nick names. -struct VCSBaseSettings { - VCSBaseSettings(); +struct CommonVcsSettings +{ + CommonVcsSettings(); QString nickNameMailMap; QString nickNameFieldListFile; @@ -56,14 +57,15 @@ struct VCSBaseSettings { void toSettings(QSettings *) const; void fromSettings(QSettings *); - bool equals(const VCSBaseSettings &rhs) const; + bool equals(const CommonVcsSettings &rhs) const; }; -inline bool operator==(const VCSBaseSettings &s1, const VCSBaseSettings &s2) { return s1.equals(s2); } -inline bool operator!=(const VCSBaseSettings &s1, const VCSBaseSettings &s2) { return !s1.equals(s2); } +inline bool operator==(const CommonVcsSettings &s1, const CommonVcsSettings &s2) { return s1.equals(s2); } +inline bool operator!=(const CommonVcsSettings &s1, const CommonVcsSettings &s2) { return !s1.equals(s2); } + +QDebug operator<<(QDebug, const CommonVcsSettings &); -QDebug operator<<(QDebug,const VCSBaseSettings& ); } // namespace Internal } // namespace VCSBase -#endif // VCSBASESETTINGS_H +#endif // COMMONVCSSETTINGS_H diff --git a/src/plugins/vcsbase/vcsbase.pro b/src/plugins/vcsbase/vcsbase.pro index 497d7d732b..2f3c1c0be6 100644 --- a/src/plugins/vcsbase/vcsbase.pro +++ b/src/plugins/vcsbase/vcsbase.pro @@ -17,8 +17,8 @@ HEADERS += vcsbase_global.h \ submiteditorfile.h \ basevcssubmiteditorfactory.h \ submitfilemodel.h \ - vcsbasesettings.h \ - vcsbasesettingspage.h \ + commonvcssettings.h \ + commonsettingspage.h \ nicknamedialog.h \ basecheckoutwizard.h \ checkoutwizarddialog.h \ @@ -40,8 +40,8 @@ SOURCES += vcsplugin.cpp \ submiteditorfile.cpp \ basevcssubmiteditorfactory.cpp \ submitfilemodel.cpp \ - vcsbasesettings.cpp \ - vcsbasesettingspage.cpp \ + commonvcssettings.cpp \ + commonsettingspage.cpp \ nicknamedialog.cpp \ basecheckoutwizard.cpp \ checkoutwizarddialog.cpp \ @@ -53,7 +53,7 @@ SOURCES += vcsplugin.cpp \ RESOURCES += vcsbase.qrc -FORMS += vcsbasesettingspage.ui \ +FORMS += commonsettingspage.ui \ nicknamedialog.ui \ checkoutprogresswizardpage.ui \ basecheckoutwizardpage.ui \ diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp index ac6de912cb..4ad802e32f 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp @@ -28,8 +28,9 @@ **************************************************************************/ #include "vcsbasesubmiteditor.h" + +#include "commonvcssettings.h" #include "vcsbaseoutputwindow.h" -#include "vcsbasesettings.h" #include "vcsplugin.h" #include "nicknamedialog.h" #include "submiteditorfile.h" @@ -130,7 +131,7 @@ VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *pa connect(m_d->m_widget, SIGNAL(diffSelected(QStringList)), this, SLOT(slotDiffSelectedVCSFiles(QStringList))); connect(m_d->m_widget->descriptionEdit(), SIGNAL(textChanged()), this, SLOT(slotDescriptionChanged())); - const Internal::VCSBaseSettings settings = Internal::VCSPlugin::instance()->settings(); + const Internal::CommonVcsSettings settings = Internal::VCSPlugin::instance()->settings(); // Add additional context menu settings if (!settings.submitMessageCheckScript.isEmpty() || !settings.nickNameMailMap.isEmpty()) { QAction *sep = new QAction(this); @@ -156,8 +157,8 @@ VCSBaseSubmitEditor::VCSBaseSubmitEditor(const VCSBaseSubmitEditorParameters *pa // wrapping. etc slotUpdateEditorSettings(settings); connect(Internal::VCSPlugin::instance(), - SIGNAL(settingsChanged(VCSBase::Internal::VCSBaseSettings)), - this, SLOT(slotUpdateEditorSettings(VCSBase::Internal::VCSBaseSettings))); + SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings)), + this, SLOT(slotUpdateEditorSettings(VCSBase::Internal::CommonVcsSettings))); Aggregation::Aggregate *aggregate = new Aggregation::Aggregate; aggregate->add(new Find::BaseTextFind(m_d->m_widget->descriptionEdit())); @@ -171,7 +172,7 @@ VCSBaseSubmitEditor::~VCSBaseSubmitEditor() delete m_d; } -void VCSBaseSubmitEditor::slotUpdateEditorSettings(const Internal::VCSBaseSettings &s) +void VCSBaseSubmitEditor::slotUpdateEditorSettings(const Internal::CommonVcsSettings &s) { setLineWrapWidth(s.lineWrapWidth); setLineWrap(s.lineWrap); diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.h b/src/plugins/vcsbase/vcsbasesubmiteditor.h index 3512834557..0794c37204 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.h +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.h @@ -49,7 +49,7 @@ namespace Utils { namespace VCSBase { namespace Internal { - struct VCSBaseSettings; + struct CommonVcsSettings; } struct VCSBaseSubmitEditorPrivate; @@ -183,7 +183,7 @@ private slots: void slotCheckSubmitMessage(); void slotInsertNickName(); void slotSetFieldNickName(int); - void slotUpdateEditorSettings(const VCSBase::Internal::VCSBaseSettings &); + void slotUpdateEditorSettings(const VCSBase::Internal::CommonVcsSettings &); protected: /* These hooks allow for modifying the contents that goes to diff --git a/src/plugins/vcsbase/vcsplugin.cpp b/src/plugins/vcsbase/vcsplugin.cpp index 6b5de5f605..d24ce056f9 100644 --- a/src/plugins/vcsbase/vcsplugin.cpp +++ b/src/plugins/vcsbase/vcsplugin.cpp @@ -29,7 +29,7 @@ #include "vcsplugin.h" #include "diffhighlighter.h" -#include "vcsbasesettingspage.h" +#include "commonsettingspage.h" #include "nicknamedialog.h" #include "vcsbaseoutputwindow.h" #include "corelistener.h" @@ -72,12 +72,12 @@ bool VCSPlugin::initialize(const QStringList &arguments, QString *errorMessage) m_coreListener = new CoreListener; addAutoReleasedObject(m_coreListener); - m_settingsPage = new VCSBaseSettingsPage; + m_settingsPage = new CommonOptionsPage; addAutoReleasedObject(m_settingsPage); addAutoReleasedObject(VCSBaseOutputWindow::instance()); - connect(m_settingsPage, SIGNAL(settingsChanged(VCSBase::Internal::VCSBaseSettings)), - this, SIGNAL(settingsChanged(VCSBase::Internal::VCSBaseSettings))); - connect(m_settingsPage, SIGNAL(settingsChanged(VCSBase::Internal::VCSBaseSettings)), + connect(m_settingsPage, SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings)), + this, SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings))); + connect(m_settingsPage, SIGNAL(settingsChanged(VCSBase::Internal::CommonVcsSettings)), this, SLOT(slotSettingsChanged())); slotSettingsChanged(); return true; @@ -97,7 +97,7 @@ CoreListener *VCSPlugin::coreListener() const return m_coreListener; } -VCSBaseSettings VCSPlugin::settings() const +CommonVcsSettings VCSPlugin::settings() const { return m_settingsPage->settings(); } @@ -118,8 +118,8 @@ void VCSPlugin::populateNickNameModel() if (!NickNameDialog::populateModelFromMailCapFile(settings().nickNameMailMap, m_nickNameModel, &errorMessage)) { - qWarning("%s", qPrintable(errorMessage)); - } + qWarning("%s", qPrintable(errorMessage)); + } } void VCSPlugin::slotSettingsChanged() diff --git a/src/plugins/vcsbase/vcsplugin.h b/src/plugins/vcsbase/vcsplugin.h index 6b803b0529..98f2a85179 100644 --- a/src/plugins/vcsbase/vcsplugin.h +++ b/src/plugins/vcsbase/vcsplugin.h @@ -41,8 +41,8 @@ QT_END_NAMESPACE namespace VCSBase { namespace Internal { -struct VCSBaseSettings; -class VCSBaseSettingsPage; +struct CommonVcsSettings; +class CommonOptionsPage; class CoreListener; class VCSPlugin : public ExtensionSystem::IPlugin @@ -61,7 +61,7 @@ public: CoreListener *coreListener() const; - VCSBaseSettings settings() const; + CommonVcsSettings settings() const; // Model of user nick names used for the submit // editor. Stored centrally here to achieve delayed @@ -69,7 +69,7 @@ public: QStandardItemModel *nickNameModel(); signals: - void settingsChanged(const VCSBase::Internal::VCSBaseSettings& s); + void settingsChanged(const VCSBase::Internal::CommonVcsSettings &s); private slots: void slotSettingsChanged(); @@ -78,7 +78,7 @@ private: void populateNickNameModel(); static VCSPlugin *m_instance; - VCSBaseSettingsPage *m_settingsPage; + CommonOptionsPage *m_settingsPage; QStandardItemModel *m_nickNameModel; CoreListener *m_coreListener; }; |