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:
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "cpptools_global.h"
|
||||
#include "cppindexingsupport.h"
|
||||
#include "stringtable.h"
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
#include <cplusplus/Icons.h>
|
||||
@@ -140,7 +141,7 @@ public:
|
||||
|
||||
static SymbolTypes AllTypes;
|
||||
|
||||
SearchSymbols();
|
||||
SearchSymbols(Internal::StringTable &stringTable);
|
||||
|
||||
void setSymbolsToSearchFor(const SymbolTypes &types);
|
||||
|
||||
@@ -193,9 +194,9 @@ protected:
|
||||
|
||||
private:
|
||||
QString findOrInsert(const QString &s)
|
||||
{ return *strings.insert(s); }
|
||||
{ return strings.insert(s); }
|
||||
|
||||
QSet<QString> strings; // Used to avoid QString duplication
|
||||
Internal::StringTable &strings; // Used to avoid QString duplication
|
||||
|
||||
QString _scope;
|
||||
CPlusPlus::Overview overview;
|
||||
|
||||
Reference in New Issue
Block a user