From a870c29a71b4de319f83767b55698df627715417 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Tue, 25 Feb 2014 16:16:11 +0100 Subject: C++: use a global string table for SearchSymbols. This string table uniques strings, so that multiple identical strings share their contents. It is used by the locator and the symbol searcher, and will later be used by the class view. Change-Id: Ib8b50f69bbf994d0d7a39b66dc8caf1a3d9bfb42 Reviewed-by: Nikolai Kosjar --- src/plugins/cpptools/cpplocatordata.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cpplocatordata.cpp') diff --git a/src/plugins/cpptools/cpplocatordata.cpp b/src/plugins/cpptools/cpplocatordata.cpp index a76b6802ca..27cebacd26 100644 --- a/src/plugins/cpptools/cpplocatordata.cpp +++ b/src/plugins/cpptools/cpplocatordata.cpp @@ -27,8 +27,8 @@ ** ****************************************************************************/ - #include "cpplocatordata.h" +#include "cpptoolsplugin.h" using namespace CppTools; using namespace CppTools::Internal; @@ -37,6 +37,8 @@ static const int MaxPendingDocuments = 10; CppLocatorData::CppLocatorData(CppModelManager *modelManager) : m_modelManager(modelManager) + , m_strings(CppToolsPlugin::stringTable()) + , m_search(m_strings) , m_pendingDocumentsMutex(QMutex::Recursive) { m_search.setSymbolsToSearchFor(SymbolSearcher::Enums @@ -104,8 +106,9 @@ void CppLocatorData::onAboutToRemoveFiles(const QStringList &files) m_allEnums.remove(file); m_allClasses.remove(file); m_allFunctions.remove(file); - removeFilePath(file); } + + m_strings.scheduleGC(); } void CppLocatorData::flushPendingDocument(bool force) -- cgit v1.2.1