diff --git a/src/plugins/coreplugin/coreplugin.qbs b/src/plugins/coreplugin/coreplugin.qbs index 5ca643db13d..26c5a0bfc09 100644 --- a/src/plugins/coreplugin/coreplugin.qbs +++ b/src/plugins/coreplugin/coreplugin.qbs @@ -280,9 +280,9 @@ QtcPlugin { "locatorwidget.h", "opendocumentsfilter.cpp", "opendocumentsfilter.h", - "settingspage.cpp", - "settingspage.h", - "settingspage.ui", + "locatorsettingspage.cpp", + "locatorsettingspage.h", + "locatorsettingspage.ui", "images/locator.png", "images/reload.png", ] diff --git a/src/plugins/coreplugin/locator/locator.cpp b/src/plugins/coreplugin/locator/locator.cpp index 13d006c378c..47cebc69e72 100644 --- a/src/plugins/coreplugin/locator/locator.cpp +++ b/src/plugins/coreplugin/locator/locator.cpp @@ -35,7 +35,7 @@ #include "locatorwidget.h" #include "opendocumentsfilter.h" #include "filesystemfilter.h" -#include "settingspage.h" +#include "locatorsettingspage.h" #include #include @@ -86,7 +86,7 @@ void Locator::initialize(CorePlugin *corePlugin, const QStringList &, QString *) { m_corePlugin = corePlugin; - m_settingsPage = new SettingsPage(this); + m_settingsPage = new LocatorSettingsPage(this); m_corePlugin->addObject(m_settingsPage); m_locatorWidget = new LocatorWidget(this); diff --git a/src/plugins/coreplugin/locator/locator.h b/src/plugins/coreplugin/locator/locator.h index 901d72e9b7c..069b6b80bfa 100644 --- a/src/plugins/coreplugin/locator/locator.h +++ b/src/plugins/coreplugin/locator/locator.h @@ -49,7 +49,7 @@ class CorePlugin; class LocatorWidget; class OpenDocumentsFilter; class FileSystemFilter; -class SettingsPage; +class LocatorSettingsPage; class Locator : public QObject { @@ -86,7 +86,7 @@ private: void loadSettingsHelper(S *settings); LocatorWidget *m_locatorWidget; - SettingsPage *m_settingsPage; + LocatorSettingsPage *m_settingsPage; bool m_settingsInitialized; QList m_filters; diff --git a/src/plugins/coreplugin/locator/locator.pri b/src/plugins/coreplugin/locator/locator.pri index f5b214b1a98..5ff92bfd43d 100644 --- a/src/plugins/coreplugin/locator/locator.pri +++ b/src/plugins/coreplugin/locator/locator.pri @@ -3,7 +3,6 @@ HEADERS += \ $$PWD/commandlocator.h \ $$PWD/locatorwidget.h \ $$PWD/locatorfiltersfilter.h \ - $$PWD/settingspage.h \ $$PWD/ilocatorfilter.h \ $$PWD/opendocumentsfilter.h \ $$PWD/filesystemfilter.h \ @@ -12,7 +11,8 @@ HEADERS += \ $$PWD/locatormanager.h \ $$PWD/basefilefilter.h \ $$PWD/executefilter.h \ - $$PWD/locatorsearchutils.h + $$PWD/locatorsearchutils.h \ + $$PWD/locatorsettingspage.h SOURCES += \ $$PWD/locator.cpp \ @@ -21,18 +21,18 @@ SOURCES += \ $$PWD/locatorfiltersfilter.cpp \ $$PWD/opendocumentsfilter.cpp \ $$PWD/filesystemfilter.cpp \ - $$PWD/settingspage.cpp \ $$PWD/directoryfilter.cpp \ $$PWD/locatormanager.cpp \ $$PWD/basefilefilter.cpp \ $$PWD/ilocatorfilter.cpp \ $$PWD/executefilter.cpp \ - $$PWD/locatorsearchutils.cpp + $$PWD/locatorsearchutils.cpp \ + $$PWD/locatorsettingspage.cpp FORMS += \ - $$PWD/settingspage.ui \ $$PWD/filesystemfilter.ui \ - $$PWD/directoryfilter.ui + $$PWD/directoryfilter.ui \ + $$PWD/locatorsettingspage.ui RESOURCES += \ $$PWD/locator.qrc diff --git a/src/plugins/coreplugin/locator/settingspage.cpp b/src/plugins/coreplugin/locator/locatorsettingspage.cpp similarity index 92% rename from src/plugins/coreplugin/locator/settingspage.cpp rename to src/plugins/coreplugin/locator/locatorsettingspage.cpp index 34cf4fea94b..affeb07556b 100644 --- a/src/plugins/coreplugin/locator/settingspage.cpp +++ b/src/plugins/coreplugin/locator/locatorsettingspage.cpp @@ -28,7 +28,7 @@ ** ****************************************************************************/ -#include "settingspage.h" +#include "locatorsettingspage.h" #include "locatorconstants.h" #include "locator.h" @@ -45,7 +45,7 @@ Q_DECLARE_METATYPE(Core::ILocatorFilter*) using namespace Core; using namespace Core::Internal; -SettingsPage::SettingsPage(Locator *plugin) +LocatorSettingsPage::LocatorSettingsPage(Locator *plugin) : m_plugin(plugin), m_widget(0) { setId(Constants::FILTER_OPTIONS_PAGE); @@ -55,7 +55,7 @@ SettingsPage::SettingsPage(Locator *plugin) setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CORE_ICON)); } -QWidget *SettingsPage::widget() +QWidget *LocatorSettingsPage::widget() { if (!m_widget) { m_widget = new QWidget; @@ -81,7 +81,7 @@ QWidget *SettingsPage::widget() return m_widget; } -void SettingsPage::apply() +void LocatorSettingsPage::apply() { // Delete removed filters and clear added filters qDeleteAll(m_removedFilters); @@ -97,7 +97,7 @@ void SettingsPage::apply() saveFilterStates(); } -void SettingsPage::finish() +void LocatorSettingsPage::finish() { // If settings were applied, this shouldn't change anything. Otherwise it // makes sure the filter states aren't changed permanently. @@ -115,26 +115,26 @@ void SettingsPage::finish() delete m_widget; } -void SettingsPage::requestRefresh() +void LocatorSettingsPage::requestRefresh() { if (!m_refreshFilters.isEmpty()) m_plugin->refresh(m_refreshFilters); } -void SettingsPage::saveFilterStates() +void LocatorSettingsPage::saveFilterStates() { m_filterStates.clear(); foreach (ILocatorFilter *filter, m_filters) m_filterStates.insert(filter, filter->saveState()); } -void SettingsPage::restoreFilterStates() +void LocatorSettingsPage::restoreFilterStates() { foreach (ILocatorFilter *filter, m_filterStates.keys()) filter->restoreState(m_filterStates.value(filter)); } -void SettingsPage::updateFilterList() +void LocatorSettingsPage::updateFilterList() { m_ui.filterList->clear(); foreach (ILocatorFilter *filter, m_filters) { @@ -154,7 +154,7 @@ void SettingsPage::updateFilterList() m_ui.filterList->setCurrentRow(0); } -void SettingsPage::updateButtonStates() +void LocatorSettingsPage::updateButtonStates() { QListWidgetItem *item = m_ui.filterList->currentItem(); ILocatorFilter *filter = (item ? item->data(Qt::UserRole).value() : 0); @@ -162,7 +162,7 @@ void SettingsPage::updateButtonStates() m_ui.removeButton->setEnabled(filter && m_customFilters.contains(filter)); } -void SettingsPage::configureFilter(QListWidgetItem *item) +void LocatorSettingsPage::configureFilter(QListWidgetItem *item) { if (!item) item = m_ui.filterList->currentItem(); @@ -179,7 +179,7 @@ void SettingsPage::configureFilter(QListWidgetItem *item) updateFilterList(); } -void SettingsPage::addCustomFilter() +void LocatorSettingsPage::addCustomFilter() { ILocatorFilter *filter = new DirectoryFilter( Id(Constants::CUSTOM_FILTER_BASEID).withSuffix(m_customFilters.size() + 1)); @@ -193,7 +193,7 @@ void SettingsPage::addCustomFilter() } } -void SettingsPage::removeCustomFilter() +void LocatorSettingsPage::removeCustomFilter() { QListWidgetItem *item = m_ui.filterList->currentItem(); QTC_ASSERT(item, return); diff --git a/src/plugins/coreplugin/locator/settingspage.h b/src/plugins/coreplugin/locator/locatorsettingspage.h similarity index 91% rename from src/plugins/coreplugin/locator/settingspage.h rename to src/plugins/coreplugin/locator/locatorsettingspage.h index 1dcb58f1286..5f74f1a9421 100644 --- a/src/plugins/coreplugin/locator/settingspage.h +++ b/src/plugins/coreplugin/locator/locatorsettingspage.h @@ -28,10 +28,10 @@ ** ****************************************************************************/ -#ifndef SETTINGSPAGE_H -#define SETTINGSPAGE_H +#ifndef LOCATORSETTINGSPAGE_H +#define LOCATORSETTINGSPAGE_H -#include "ui_settingspage.h" +#include "ui_locatorsettingspage.h" #include @@ -50,12 +50,12 @@ namespace Internal { class Locator; -class SettingsPage : public IOptionsPage +class LocatorSettingsPage : public IOptionsPage { Q_OBJECT public: - explicit SettingsPage(Locator *plugin); + explicit LocatorSettingsPage(Locator *plugin); QWidget *widget(); void apply(); @@ -87,4 +87,4 @@ private: } // namespace Internal } // namespace Core -#endif // SETTINGSPAGE_H +#endif // LOCATORSETTINGSPAGE_H diff --git a/src/plugins/coreplugin/locator/settingspage.ui b/src/plugins/coreplugin/locator/locatorsettingspage.ui similarity index 100% rename from src/plugins/coreplugin/locator/settingspage.ui rename to src/plugins/coreplugin/locator/locatorsettingspage.ui