Commit c30c2906 authored by Eike Ziller's avatar Eike Ziller

Avoid holding on lots of data with C++ Find Usages

The snapshots at the moment of search were held as long as the
corresponding search result panel was kept, to allow mapping of the old
symbol to the corresponding symbol in the new snapshot.
Now we just save the file name and ID of the old symbol.

Change-Id: Iaf3c9ca27ec2b788f142bd0dd6b86e34e66d5c8b
Reviewed-by: default avatarErik Verbruggen <>
parent 155567a0
This diff is collapsed.
......@@ -54,8 +54,8 @@ namespace Internal {
class CppFindReferencesParameters
CPlusPlus::LookupContext context;
CPlusPlus::Symbol *symbol;
QList<QByteArray> symbolId;
QByteArray symbolFileName;
class CppFindReferences: public QObject
......@@ -92,12 +92,13 @@ private:
const QString &replacement, bool replace);
void findMacroUses(const CPlusPlus::Macro &macro, const QString &replacement,
bool replace);
void findAll_helper(Find::SearchResult *search);
void findAll_helper(Find::SearchResult *search, CPlusPlus::Symbol *symbol,
const CPlusPlus::LookupContext &context);
CPlusPlus::DependencyTable dependencyTable() const;
void setDependencyTable(const CPlusPlus::DependencyTable &newTable);
void createWatcher(const QFuture<CPlusPlus::Usage> &future, Find::SearchResult *search);
bool findSymbol(CppFindReferencesParameters *parameters,
const CPlusPlus::Snapshot &snapshot);
CPlusPlus::Symbol *findSymbol(const CppFindReferencesParameters &parameters,
const CPlusPlus::Snapshot &snapshot, CPlusPlus::LookupContext *context);
QPointer<CppModelManagerInterface> _modelManager;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment