aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools/cppfindreferences.h
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2013-10-18 12:42:46 +0200
committerEike Ziller <eike.ziller@digia.com>2013-10-18 13:05:46 +0200
commitc30c29063109c160378db26a3c70b5302740486d (patch)
treeeecf81bd0a09dded99882f9611184abf67fa98f6 /src/plugins/cpptools/cppfindreferences.h
parent155567a0b309062b1102c1ffb6364bacd22c526a (diff)
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: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.h')
-rw-r--r--src/plugins/cpptools/cppfindreferences.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.h b/src/plugins/cpptools/cppfindreferences.h
index 13f2da5fc6..c902ed0a85 100644
--- a/src/plugins/cpptools/cppfindreferences.h
+++ b/src/plugins/cpptools/cppfindreferences.h
@@ -54,8 +54,8 @@ namespace Internal {
class CppFindReferencesParameters
{
public:
- 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);
private:
QPointer<CppModelManagerInterface> _modelManager;