forked from qt-creator/qt-creator
ILocatorFilter: Provide default implementation for accept()
Change-Id: Ide3c65ac78da60c9634b8f1c3009e947e8f1e2f3 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -168,16 +168,6 @@ QList<LocatorFilterEntry> ClangGlobalSymbolFilter::matchesFor(
|
||||
return matches;
|
||||
}
|
||||
|
||||
void ClangGlobalSymbolFilter::accept(const LocatorFilterEntry &selection, QString *newText,
|
||||
int *selectionStart, int *selectionLength) const
|
||||
{
|
||||
Q_UNUSED(newText)
|
||||
Q_UNUSED(selectionStart)
|
||||
Q_UNUSED(selectionLength)
|
||||
EditorManager::openEditor(selection);
|
||||
}
|
||||
|
||||
|
||||
ClangClassesFilter::ClangClassesFilter()
|
||||
: ClangGlobalSymbolFilter(new CppClassesFilter, new LspClassesFilter)
|
||||
{
|
||||
@@ -344,14 +334,5 @@ QList<LocatorFilterEntry> ClangdCurrentDocumentFilter::matchesFor(
|
||||
return d->activeFilter->matchesFor(future, entry);
|
||||
}
|
||||
|
||||
void ClangdCurrentDocumentFilter::accept(const LocatorFilterEntry &selection, QString *newText,
|
||||
int *selectionStart, int *selectionLength) const
|
||||
{
|
||||
Q_UNUSED(newText)
|
||||
Q_UNUSED(selectionStart)
|
||||
Q_UNUSED(selectionLength)
|
||||
EditorManager::openEditor(selection);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ClangCodeModel
|
||||
|
||||
@@ -22,9 +22,6 @@ private:
|
||||
void prepareSearch(const QString &entry) override;
|
||||
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
|
||||
const QString &entry) override;
|
||||
void accept(const Core::LocatorFilterEntry &selection, QString *newText,
|
||||
int *selectionStart, int *selectionLength) const override;
|
||||
|
||||
Core::ILocatorFilter * const m_cppFilter;
|
||||
LanguageClient::WorkspaceLocatorFilter * const m_lspFilter;
|
||||
};
|
||||
@@ -53,9 +50,6 @@ private:
|
||||
void prepareSearch(const QString &entry) override;
|
||||
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
|
||||
const QString &entry) override;
|
||||
void accept(const Core::LocatorFilterEntry &selection, QString *newText,
|
||||
int *selectionStart, int *selectionLength) const override;
|
||||
|
||||
class Private;
|
||||
Private * const d;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user