forked from qt-creator/qt-creator
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:
@@ -38,6 +38,7 @@
|
||||
|
||||
#include "cppmodelmanager.h"
|
||||
#include "searchsymbols.h"
|
||||
#include "stringtable.h"
|
||||
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
@@ -62,15 +63,12 @@ private:
|
||||
QList<ModelItemInfo> > &items) const;
|
||||
|
||||
QString findOrInsertFilePath(const QString &path)
|
||||
{ return *m_filePaths.insert(path); }
|
||||
|
||||
void removeFilePath(const QString &path)
|
||||
{ m_filePaths.remove(path); }
|
||||
{ return m_strings.insert(path); }
|
||||
|
||||
private:
|
||||
CppModelManager *m_modelManager;
|
||||
|
||||
QSet<QString> m_filePaths; // Used to avoid QString duplication
|
||||
StringTable &m_strings; // Used to avoid QString duplication
|
||||
|
||||
SearchSymbols m_search;
|
||||
QHash<QString, QList<ModelItemInfo> > m_allEnums;
|
||||
|
||||
Reference in New Issue
Block a user