C++: Share symbol finder across editor instances

Change-Id: I75880597d237bbbe1393dd02153cedba1165bed6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Leandro Melo
2012-01-24 11:07:26 +01:00
parent 6554a793a5
commit 8e3c88f02b
5 changed files with 12 additions and 21 deletions

View File

@@ -65,7 +65,7 @@ public:
} // end of anonymous namespace
static const int kMaxSize = 10;
static const int kMaxCacheSize = 10;
SymbolFinder::SymbolFinder()
{}
@@ -339,7 +339,7 @@ void SymbolFinder::trackCacheUse(const QString &referenceFile)
m_recent.append(referenceFile);
// We don't want this to grow too much.
if (m_recent.size() > kMaxSize) {
if (m_recent.size() > kMaxCacheSize) {
const QString &oldest = m_recent.takeFirst();
m_filePriorityCache.remove(oldest);
m_fileMetaCache.remove(oldest);