diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-07-30 16:29:02 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2014-08-20 10:26:47 +0200 |
commit | b8a6a4dd4e2a02d9afd54303550570f1fcbcb586 (patch) | |
tree | 51472b8c5c73e17900b78c65ce7286f9cd9b8eb5 /src/plugins/cpptools/cppfindreferences.cpp | |
parent | 077bbf6803d4f3d81622720c9452a7e1a00c81fb (diff) |
CppTools: Move WorkingCopy to new cppworkingcopy.{h,cpp}
Change-Id: I447acf28849bffb52c1e6b6eafdde221ec0b179e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
-rw-r--r-- | src/plugins/cpptools/cppfindreferences.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp index 63b3b6a587e..27bd536a400 100644 --- a/src/plugins/cpptools/cppfindreferences.cpp +++ b/src/plugins/cpptools/cppfindreferences.cpp @@ -31,6 +31,7 @@ #include "cpptoolsconstants.h" #include "cppmodelmanagerinterface.h" +#include "cppworkingcopy.h" #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/icore.h> @@ -54,7 +55,7 @@ using namespace CppTools; using namespace CPlusPlus; static QByteArray getSource(const QString &fileName, - const CppModelManagerInterface::WorkingCopy &workingCopy) + const WorkingCopy &workingCopy) { if (workingCopy.contains(fileName)) { return workingCopy.source(fileName); @@ -167,14 +168,14 @@ namespace { class ProcessFile: public std::unary_function<QString, QList<Usage> > { - const CppModelManagerInterface::WorkingCopy workingCopy; + const WorkingCopy workingCopy; const Snapshot snapshot; Document::Ptr symbolDocument; Symbol *symbol; QFutureInterface<Usage> *future; public: - ProcessFile(const CppModelManagerInterface::WorkingCopy &workingCopy, + ProcessFile(const WorkingCopy &workingCopy, const Snapshot snapshot, Document::Ptr symbolDocument, Symbol *symbol, @@ -268,7 +269,7 @@ QList<int> CppFindReferences::references(Symbol *symbol, const LookupContext &co } static void find_helper(QFutureInterface<Usage> &future, - const CppModelManagerInterface::WorkingCopy workingCopy, + const WorkingCopy workingCopy, const LookupContext context, CppFindReferences *findRefs, Symbol *symbol) @@ -367,7 +368,7 @@ void CppFindReferences::findAll_helper(Core::SearchResult *search, CPlusPlus::Sy this, SLOT(openEditor(Core::SearchResultItem))); Core::SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus); - const CppModelManagerInterface::WorkingCopy workingCopy = m_modelManager->workingCopy(); + const WorkingCopy workingCopy = m_modelManager->workingCopy(); QFuture<Usage> result; result = QtConcurrent::run(&find_helper, workingCopy, context, this, symbol); createWatcher(result, search); @@ -531,13 +532,13 @@ namespace { class FindMacroUsesInFile: public std::unary_function<QString, QList<Usage> > { - const CppModelManagerInterface::WorkingCopy workingCopy; + const WorkingCopy workingCopy; const Snapshot snapshot; const Macro ¯o; QFutureInterface<Usage> *future; public: - FindMacroUsesInFile(const CppModelManagerInterface::WorkingCopy &workingCopy, + FindMacroUsesInFile(const WorkingCopy &workingCopy, const Snapshot snapshot, const Macro ¯o, QFutureInterface<Usage> *future) @@ -611,7 +612,7 @@ restart_search: } // end of anonymous namespace static void findMacroUses_helper(QFutureInterface<Usage> &future, - const CppModelManagerInterface::WorkingCopy workingCopy, + const WorkingCopy workingCopy, const Snapshot snapshot, CppFindReferences *findRefs, const Macro macro) @@ -663,7 +664,7 @@ void CppFindReferences::findMacroUses(const Macro ¯o, const QString &replace connect(search, SIGNAL(paused(bool)), this, SLOT(setPaused(bool))); const Snapshot snapshot = m_modelManager->snapshot(); - const CppModelManagerInterface::WorkingCopy workingCopy = m_modelManager->workingCopy(); + const WorkingCopy workingCopy = m_modelManager->workingCopy(); // add the macro definition itself { |