forked from qt-creator/qt-creator
ClangGlobalSymbolFilter: Don't remove duplicates prematurely
That's being done later, inside Core::Internal::runSearch(). Change-Id: Ib131aefdb39dbe2dfd457020ff13f1c453814597 Reviewed-by: Christian Kandeler <christian.kandeler@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:
@@ -151,21 +151,7 @@ void ClangGlobalSymbolFilter::prepareSearch(const QString &entry)
|
||||
QList<LocatorFilterEntry> ClangGlobalSymbolFilter::matchesFor(
|
||||
QFutureInterface<LocatorFilterEntry> &future, const QString &entry)
|
||||
{
|
||||
QList<LocatorFilterEntry> matches = m_cppFilter->matchesFor(future, entry);
|
||||
const QList<LocatorFilterEntry> lspMatches = m_lspFilter->matchesFor(future, entry);
|
||||
if (!lspMatches.isEmpty()) {
|
||||
QSet<Link> locations;
|
||||
for (const auto &entry : std::as_const(matches)) {
|
||||
QTC_ASSERT(entry.linkForEditor, continue);
|
||||
locations.insert(*entry.linkForEditor);
|
||||
}
|
||||
for (const auto &entry : lspMatches) {
|
||||
QTC_ASSERT(entry.linkForEditor, continue);
|
||||
if (!locations.contains(*entry.linkForEditor))
|
||||
matches << entry; // TODO: Insert sorted?
|
||||
}
|
||||
}
|
||||
return matches;
|
||||
return m_cppFilter->matchesFor(future, entry) + m_lspFilter->matchesFor(future, entry);
|
||||
}
|
||||
|
||||
ClangClassesFilter::ClangClassesFilter()
|
||||
|
||||
Reference in New Issue
Block a user