C++: Change the locator filter to queue changed documents.

The changed documents get searched for symbols when either a limit of
10 pending documents is reached, or when the filter is asked to return
all matches.

Change-Id: Ic18fc66b0a802165fdd8a028bd13d0ce11524510
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Erik Verbruggen
2013-02-26 11:14:02 +01:00
committed by Erik Verbruggen
parent e0ba5d955c
commit 45656335fc
4 changed files with 62 additions and 14 deletions

View File

@@ -60,10 +60,11 @@ void SearchSymbols::setSeparateScope(bool separateScope)
this->separateScope = separateScope;
}
QList<ModelItemInfo> SearchSymbols::operator()(Document::Ptr doc, const QString &scope)
QList<ModelItemInfo> SearchSymbols::operator()(Document::Ptr doc, int sizeHint, const QString &scope)
{
QString previousScope = switchScope(scope);
items.clear();
items.reserve(sizeHint);
for (unsigned i = 0; i < doc->globalSymbolCount(); ++i) {
accept(doc->globalSymbolAt(i));
}