Commit 89d75814 authored by con's avatar con

CppQuickOpenFilter --> CppLocatorFilter

parent c47b3db7
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
using namespace CppTools::Internal; using namespace CppTools::Internal;
CppClassesFilter::CppClassesFilter(CppModelManager *manager, Core::EditorManager *editorManager) CppClassesFilter::CppClassesFilter(CppModelManager *manager, Core::EditorManager *editorManager)
: CppQuickOpenFilter(manager, editorManager) : CppLocatorFilter(manager, editorManager)
{ {
setShortcutString("c"); setShortcutString("c");
setIncludedByDefault(false); setIncludedByDefault(false);
......
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
#ifndef CPPCLASSESFILTER_H #ifndef CPPCLASSESFILTER_H
#define CPPCLASSESFILTER_H #define CPPCLASSESFILTER_H
#include <cppquickopenfilter.h> #include <cpplocatorfilter.h>
namespace CppTools { namespace CppTools {
namespace Internal { namespace Internal {
class CppClassesFilter : public CppQuickOpenFilter class CppClassesFilter : public CppLocatorFilter
{ {
Q_OBJECT Q_OBJECT
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
using namespace CppTools::Internal; using namespace CppTools::Internal;
CppFunctionsFilter::CppFunctionsFilter(CppModelManager *manager, Core::EditorManager *editorManager) CppFunctionsFilter::CppFunctionsFilter(CppModelManager *manager, Core::EditorManager *editorManager)
: CppQuickOpenFilter(manager, editorManager) : CppLocatorFilter(manager, editorManager)
{ {
setShortcutString("m"); setShortcutString("m");
setIncludedByDefault(false); setIncludedByDefault(false);
......
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
#ifndef CPPFUNCTIONSFILTER_H #ifndef CPPFUNCTIONSFILTER_H
#define CPPFUNCTIONSFILTER_H #define CPPFUNCTIONSFILTER_H
#include <cppquickopenfilter.h> #include <cpplocatorfilter.h>
namespace CppTools { namespace CppTools {
namespace Internal { namespace Internal {
class CppFunctionsFilter : public CppQuickOpenFilter class CppFunctionsFilter : public CppLocatorFilter
{ {
Q_OBJECT Q_OBJECT
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
** **
**************************************************************************/ **************************************************************************/
#include "cppquickopenfilter.h" #include "cpplocatorfilter.h"
#include "cppmodelmanager.h" #include "cppmodelmanager.h"
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
using namespace CppTools::Internal; using namespace CppTools::Internal;
CppQuickOpenFilter::CppQuickOpenFilter(CppModelManager *manager, Core::EditorManager *editorManager) CppLocatorFilter::CppLocatorFilter(CppModelManager *manager, Core::EditorManager *editorManager)
: m_manager(manager), : m_manager(manager),
m_editorManager(editorManager), m_editorManager(editorManager),
m_forceNewSearchList(true) m_forceNewSearchList(true)
...@@ -54,21 +54,21 @@ CppQuickOpenFilter::CppQuickOpenFilter(CppModelManager *manager, Core::EditorMan ...@@ -54,21 +54,21 @@ CppQuickOpenFilter::CppQuickOpenFilter(CppModelManager *manager, Core::EditorMan
this, SLOT(onAboutToRemoveFiles(QStringList))); this, SLOT(onAboutToRemoveFiles(QStringList)));
} }
CppQuickOpenFilter::~CppQuickOpenFilter() CppLocatorFilter::~CppLocatorFilter()
{ } { }
void CppQuickOpenFilter::onDocumentUpdated(CPlusPlus::Document::Ptr doc) void CppLocatorFilter::onDocumentUpdated(CPlusPlus::Document::Ptr doc)
{ {
m_searchList[doc->fileName()] = Info(doc); m_searchList[doc->fileName()] = Info(doc);
} }
void CppQuickOpenFilter::onAboutToRemoveFiles(const QStringList &files) void CppLocatorFilter::onAboutToRemoveFiles(const QStringList &files)
{ {
foreach (const QString &file, files) foreach (const QString &file, files)
m_searchList.remove(file); m_searchList.remove(file);
} }
void CppQuickOpenFilter::refresh(QFutureInterface<void> &future) void CppLocatorFilter::refresh(QFutureInterface<void> &future)
{ {
Q_UNUSED(future) Q_UNUSED(future)
} }
...@@ -79,7 +79,7 @@ static bool compareLexigraphically(const QuickOpen::FilterEntry &a, ...@@ -79,7 +79,7 @@ static bool compareLexigraphically(const QuickOpen::FilterEntry &a,
return a.displayName < b.displayName; return a.displayName < b.displayName;
} }
QList<QuickOpen::FilterEntry> CppQuickOpenFilter::matchesFor(const QString &origEntry) QList<QuickOpen::FilterEntry> CppLocatorFilter::matchesFor(const QString &origEntry)
{ {
QString entry = trimWildcards(origEntry); QString entry = trimWildcards(origEntry);
QList<QuickOpen::FilterEntry> goodEntries; QList<QuickOpen::FilterEntry> goodEntries;
...@@ -131,7 +131,7 @@ QList<QuickOpen::FilterEntry> CppQuickOpenFilter::matchesFor(const QString &orig ...@@ -131,7 +131,7 @@ QList<QuickOpen::FilterEntry> CppQuickOpenFilter::matchesFor(const QString &orig
return betterEntries; return betterEntries;
} }
void CppQuickOpenFilter::accept(QuickOpen::FilterEntry selection) const void CppLocatorFilter::accept(QuickOpen::FilterEntry selection) const
{ {
ModelItemInfo info = qvariant_cast<CppTools::Internal::ModelItemInfo>(selection.internalData); ModelItemInfo info = qvariant_cast<CppTools::Internal::ModelItemInfo>(selection.internalData);
TextEditor::BaseTextEditor::openEditorAt(info.fileName, info.line); TextEditor::BaseTextEditor::openEditorAt(info.fileName, info.line);
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
** **
**************************************************************************/ **************************************************************************/
#ifndef CPPQUICKOPENFILTER_H #ifndef CPPLOCATORFILTER_H
#define CPPQUICKOPENFILTER_H #define CPPLOCATORFILTER_H
#include "searchsymbols.h" #include "searchsymbols.h"
...@@ -43,12 +43,12 @@ namespace Internal { ...@@ -43,12 +43,12 @@ namespace Internal {
class CppModelManager; class CppModelManager;
class CppQuickOpenFilter : public QuickOpen::ILocatorFilter class CppLocatorFilter : public QuickOpen::ILocatorFilter
{ {
Q_OBJECT Q_OBJECT
public: public:
CppQuickOpenFilter(CppModelManager *manager, Core::EditorManager *editorManager); CppLocatorFilter(CppModelManager *manager, Core::EditorManager *editorManager);
~CppQuickOpenFilter(); ~CppLocatorFilter();
QString trName() const { return tr("Classes and Methods"); } QString trName() const { return tr("Classes and Methods"); }
QString name() const { return QLatin1String("Classes and Methods"); } QString name() const { return QLatin1String("Classes and Methods"); }
...@@ -86,4 +86,4 @@ private: ...@@ -86,4 +86,4 @@ private:
} // namespace Internal } // namespace Internal
} // namespace CppTools } // namespace CppTools
#endif // CPPQUICKOPENFILTER_H #endif // CPPLOCATORFILTER_H
...@@ -15,7 +15,7 @@ HEADERS += completionsettingspage.h \ ...@@ -15,7 +15,7 @@ HEADERS += completionsettingspage.h \
cppfunctionsfilter.h \ cppfunctionsfilter.h \
cppmodelmanager.h \ cppmodelmanager.h \
cppmodelmanagerinterface.h \ cppmodelmanagerinterface.h \
cppquickopenfilter.h \ cpplocatorfilter.h \
cpptools_global.h \ cpptools_global.h \
cpptoolsconstants.h \ cpptoolsconstants.h \
cpptoolseditorsupport.h \ cpptoolseditorsupport.h \
...@@ -31,7 +31,7 @@ SOURCES += completionsettingspage.cpp \ ...@@ -31,7 +31,7 @@ SOURCES += completionsettingspage.cpp \
cppcurrentdocumentfilter.cpp \ cppcurrentdocumentfilter.cpp \
cppfunctionsfilter.cpp \ cppfunctionsfilter.cpp \
cppmodelmanager.cpp \ cppmodelmanager.cpp \
cppquickopenfilter.cpp \ cpplocatorfilter.cpp \
cpptoolseditorsupport.cpp \ cpptoolseditorsupport.cpp \
cpptoolsplugin.cpp \ cpptoolsplugin.cpp \
searchsymbols.cpp \ searchsymbols.cpp \
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "cppcurrentdocumentfilter.h" #include "cppcurrentdocumentfilter.h"
#include "cppmodelmanager.h" #include "cppmodelmanager.h"
#include "cpptoolsconstants.h" #include "cpptoolsconstants.h"
#include "cppquickopenfilter.h" #include "cpplocatorfilter.h"
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
...@@ -104,7 +104,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error) ...@@ -104,7 +104,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(new CppQuickFixCollector(m_modelManager)); addAutoReleasedObject(new CppQuickFixCollector(m_modelManager));
CppQuickOpenFilter *quickOpenFilter = new CppQuickOpenFilter(m_modelManager, CppLocatorFilter *quickOpenFilter = new CppLocatorFilter(m_modelManager,
core->editorManager()); core->editorManager());
addAutoReleasedObject(quickOpenFilter); addAutoReleasedObject(quickOpenFilter);
addAutoReleasedObject(new CppClassesFilter(m_modelManager, core->editorManager())); addAutoReleasedObject(new CppClassesFilter(m_modelManager, core->editorManager()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment