diff --git a/src/plugins/cppeditor/cppquickfix.cpp b/src/plugins/cppeditor/cppquickfix.cpp index 49d56dc93674dce23b994530711aac13e7628aa2..9d1c08060936b7b8275d23f4986f821e14d73693 100644 --- a/src/plugins/cppeditor/cppquickfix.cpp +++ b/src/plugins/cppeditor/cppquickfix.cpp @@ -102,7 +102,7 @@ CppQuickFixOperation::~CppQuickFixOperation() void CppQuickFixOperation::perform() { - CppRefactoringChanges refactoring(_state.document(), _state.snapshot()); + CppRefactoringChanges refactoring(_state.snapshot()); CppRefactoringFile current = refactoring.file(fileName()); performChanges(¤t, &refactoring); diff --git a/src/plugins/cppeditor/cpprefactoringchanges.cpp b/src/plugins/cppeditor/cpprefactoringchanges.cpp index 762c4cab1269a85773a2a161ec93d742a1af1bef..842e6294a826f259563e1fbca55dc50f6f843c10 100644 --- a/src/plugins/cppeditor/cpprefactoringchanges.cpp +++ b/src/plugins/cppeditor/cpprefactoringchanges.cpp @@ -41,31 +41,19 @@ using namespace CppEditor; using namespace CPlusPlus; using namespace Utils; -CppRefactoringChanges::CppRefactoringChanges(const Document::Ptr &thisDocument, const Snapshot &snapshot) - : m_thisDocument(thisDocument) - , m_snapshot(snapshot) - , m_context(m_thisDocument, m_snapshot) +CppRefactoringChanges::CppRefactoringChanges(const Snapshot &snapshot) + : m_snapshot(snapshot) , m_modelManager(CppTools::CppModelManagerInterface::instance()) { Q_ASSERT(m_modelManager); m_workingCopy = m_modelManager->workingCopy(); } -Document::Ptr CppRefactoringChanges::thisDocument() const -{ - return m_thisDocument; -} - const Snapshot &CppRefactoringChanges::snapshot() const { return m_snapshot; } -const LookupContext &CppRefactoringChanges::context() const -{ - return m_context; -} - CppRefactoringFile CppRefactoringChanges::file(const QString &fileName) { return CppRefactoringFile(fileName, this); diff --git a/src/plugins/cppeditor/cpprefactoringchanges.h b/src/plugins/cppeditor/cpprefactoringchanges.h index 92b8c575f658c2b9b8125c2e8bcf1db1615f523d..cb2f83c7cc59b6ee79af2915104bb4adf2df6543 100644 --- a/src/plugins/cppeditor/cpprefactoringchanges.h +++ b/src/plugins/cppeditor/cpprefactoringchanges.h @@ -82,13 +82,9 @@ private: class CPPEDITOR_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges { public: - CppRefactoringChanges(const CPlusPlus::Document::Ptr &thisDocument, - const CPlusPlus::Snapshot &snapshot); + CppRefactoringChanges(const CPlusPlus::Snapshot &snapshot); - CPlusPlus::Document::Ptr thisDocument() const; const CPlusPlus::Snapshot &snapshot() const; - const CPlusPlus::LookupContext &context() const; - CppRefactoringFile file(const QString &fileName); private: