Commit cd2dab29 authored by Eike Ziller's avatar Eike Ziller

Implement "search again" for find usages (C++)

Change-Id: Ia3dc174c64da9194401883a1a989a712cb7aaed8
Reviewed-by: default avatarLeandro Melo <>
parent 570dbb2d
This diff is collapsed.
...@@ -58,6 +58,13 @@ class CppModelManagerInterface; ...@@ -58,6 +58,13 @@ class CppModelManagerInterface;
namespace CppTools { namespace CppTools {
namespace Internal { namespace Internal {
class CppFindReferencesParameters
CPlusPlus::LookupContext context;
CPlusPlus::Symbol *symbol;
class CppFindReferences: public QObject class CppFindReferences: public QObject
{ {
...@@ -83,13 +90,17 @@ private Q_SLOTS: ...@@ -83,13 +90,17 @@ private Q_SLOTS:
void cancel(); void cancel();
void openEditor(const Find::SearchResultItem &item); void openEditor(const Find::SearchResultItem &item);
void onReplaceButtonClicked(const QString &text, const QList<Find::SearchResultItem> &items); void onReplaceButtonClicked(const QString &text, const QList<Find::SearchResultItem> &items);
void searchAgain();
private: private:
void findAll_helper(Find::SearchResult *search, void findUsages(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context,
CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context); const QString &replacement, bool replace);
void findAll_helper(Find::SearchResult *search);
CPlusPlus::DependencyTable dependencyTable() const; CPlusPlus::DependencyTable dependencyTable() const;
void setDependencyTable(const CPlusPlus::DependencyTable &newTable); void setDependencyTable(const CPlusPlus::DependencyTable &newTable);
void createWatcher(const QFuture<CPlusPlus::Usage> &future, Find::SearchResult *search); void createWatcher(const QFuture<CPlusPlus::Usage> &future, Find::SearchResult *search);
bool findSymbol(CppFindReferencesParameters *parameters,
const CPlusPlus::Snapshot &snapshot);
private: private:
QPointer<CPlusPlus::CppModelManagerInterface> _modelManager; QPointer<CPlusPlus::CppModelManagerInterface> _modelManager;
...@@ -102,4 +113,6 @@ private: ...@@ -102,4 +113,6 @@ private:
} // namespace Internal } // namespace Internal
} // namespace CppTools } // namespace CppTools
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