Commit 89d75814 authored by con's avatar con

CppQuickOpenFilter --> CppLocatorFilter

parent c47b3db7
......@@ -32,7 +32,7 @@
using namespace CppTools::Internal;
CppClassesFilter::CppClassesFilter(CppModelManager *manager, Core::EditorManager *editorManager)
: CppQuickOpenFilter(manager, editorManager)
: CppLocatorFilter(manager, editorManager)
{
setShortcutString("c");
setIncludedByDefault(false);
......
......@@ -30,12 +30,12 @@
#ifndef CPPCLASSESFILTER_H
#define CPPCLASSESFILTER_H
#include <cppquickopenfilter.h>
#include <cpplocatorfilter.h>
namespace CppTools {
namespace Internal {
class CppClassesFilter : public CppQuickOpenFilter
class CppClassesFilter : public CppLocatorFilter
{
Q_OBJECT
......
......@@ -32,7 +32,7 @@
using namespace CppTools::Internal;
CppFunctionsFilter::CppFunctionsFilter(CppModelManager *manager, Core::EditorManager *editorManager)
: CppQuickOpenFilter(manager, editorManager)
: CppLocatorFilter(manager, editorManager)
{
setShortcutString("m");
setIncludedByDefault(false);
......
......@@ -30,12 +30,12 @@
#ifndef CPPFUNCTIONSFILTER_H
#define CPPFUNCTIONSFILTER_H
#include <cppquickopenfilter.h>
#include <cpplocatorfilter.h>
namespace CppTools {
namespace Internal {
class CppFunctionsFilter : public CppQuickOpenFilter
class CppFunctionsFilter : public CppLocatorFilter
{
Q_OBJECT
......
......@@ -27,7 +27,7 @@
**
**************************************************************************/
#include "cppquickopenfilter.h"
#include "cpplocatorfilter.h"
#include "cppmodelmanager.h"
#include <coreplugin/editormanager/editormanager.h>
......@@ -39,7 +39,7 @@
using namespace CppTools::Internal;
CppQuickOpenFilter::CppQuickOpenFilter(CppModelManager *manager, Core::EditorManager *editorManager)
CppLocatorFilter::CppLocatorFilter(CppModelManager *manager, Core::EditorManager *editorManager)
: m_manager(manager),
m_editorManager(editorManager),
m_forceNewSearchList(true)
......@@ -54,21 +54,21 @@ CppQuickOpenFilter::CppQuickOpenFilter(CppModelManager *manager, Core::EditorMan
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);
}
void CppQuickOpenFilter::onAboutToRemoveFiles(const QStringList &files)
void CppLocatorFilter::onAboutToRemoveFiles(const QStringList &files)
{
foreach (const QString &file, files)
m_searchList.remove(file);
}
void CppQuickOpenFilter::refresh(QFutureInterface<void> &future)
void CppLocatorFilter::refresh(QFutureInterface<void> &future)
{
Q_UNUSED(future)
}
......@@ -79,7 +79,7 @@ static bool compareLexigraphically(const QuickOpen::FilterEntry &a,
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);
QList<QuickOpen::FilterEntry> goodEntries;
......@@ -131,7 +131,7 @@ QList<QuickOpen::FilterEntry> CppQuickOpenFilter::matchesFor(const QString &orig
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);
TextEditor::BaseTextEditor::openEditorAt(info.fileName, info.line);
......
......@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef CPPQUICKOPENFILTER_H
#define CPPQUICKOPENFILTER_H
#ifndef CPPLOCATORFILTER_H
#define CPPLOCATORFILTER_H
#include "searchsymbols.h"
......@@ -43,12 +43,12 @@ namespace Internal {
class CppModelManager;
class CppQuickOpenFilter : public QuickOpen::ILocatorFilter
class CppLocatorFilter : public QuickOpen::ILocatorFilter
{
Q_OBJECT
public:
CppQuickOpenFilter(CppModelManager *manager, Core::EditorManager *editorManager);
~CppQuickOpenFilter();
CppLocatorFilter(CppModelManager *manager, Core::EditorManager *editorManager);
~CppLocatorFilter();
QString trName() const { return tr("Classes and Methods"); }
QString name() const { return QLatin1String("Classes and Methods"); }
......@@ -86,4 +86,4 @@ private:
} // namespace Internal
} // namespace CppTools
#endif // CPPQUICKOPENFILTER_H
#endif // CPPLOCATORFILTER_H
......@@ -15,7 +15,7 @@ HEADERS += completionsettingspage.h \
cppfunctionsfilter.h \
cppmodelmanager.h \
cppmodelmanagerinterface.h \
cppquickopenfilter.h \
cpplocatorfilter.h \
cpptools_global.h \
cpptoolsconstants.h \
cpptoolseditorsupport.h \
......@@ -31,7 +31,7 @@ SOURCES += completionsettingspage.cpp \
cppcurrentdocumentfilter.cpp \
cppfunctionsfilter.cpp \
cppmodelmanager.cpp \
cppquickopenfilter.cpp \
cpplocatorfilter.cpp \
cpptoolseditorsupport.cpp \
cpptoolsplugin.cpp \
searchsymbols.cpp \
......
......@@ -36,7 +36,7 @@
#include "cppcurrentdocumentfilter.h"
#include "cppmodelmanager.h"
#include "cpptoolsconstants.h"
#include "cppquickopenfilter.h"
#include "cpplocatorfilter.h"
#include <extensionsystem/pluginmanager.h>
......@@ -104,7 +104,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(new CppQuickFixCollector(m_modelManager));
CppQuickOpenFilter *quickOpenFilter = new CppQuickOpenFilter(m_modelManager,
CppLocatorFilter *quickOpenFilter = new CppLocatorFilter(m_modelManager,
core->editorManager());
addAutoReleasedObject(quickOpenFilter);
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