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 <nikolai.kosjar@digia.com>
This commit is contained in:
Erik Verbruggen
2014-02-25 16:16:11 +01:00
parent a940c73d81
commit a870c29a71
13 changed files with 232 additions and 19 deletions

View File

@@ -136,7 +136,7 @@ bool CppToolsPlugin::initialize(const QStringList &arguments, QString *error)
addAutoReleasedObject(new CppLocatorFilter(locatorData));
addAutoReleasedObject(new CppClassesFilter(locatorData));
addAutoReleasedObject(new CppFunctionsFilter(locatorData));
addAutoReleasedObject(new CppCurrentDocumentFilter(modelManager));
addAutoReleasedObject(new CppCurrentDocumentFilter(modelManager, m_stringTable));
addAutoReleasedObject(new CppFileSettingsPage(m_fileSettings));
addAutoReleasedObject(new CppCodeModelSettingsPage(m_codeModelSettings));
addAutoReleasedObject(new SymbolsFindFilter(modelManager));
@@ -190,6 +190,11 @@ QSharedPointer<CppCodeModelSettings> CppToolsPlugin::codeModelSettings() const
return m_codeModelSettings;
}
StringTable &CppToolsPlugin::stringTable()
{
return instance()->m_stringTable;
}
void CppToolsPlugin::switchHeaderSource()
{
QString otherFile = correspondingHeaderOrSource(