diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-10 09:50:04 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-08-16 11:13:12 +0200 |
commit | 8f14bc0ea23495dfb1dae7aea1910e470281ee26 (patch) | |
tree | 9e0580da96ff5010d4c4b17c1ab67a709c917a31 /src/plugins/cpptools/cpprefactoringchanges.h | |
parent | 13c8f9eaaae4adf7d4dc92cc6cb1f0d5cd3995b0 (diff) | |
download | qt-creator-8f14bc0ea23495dfb1dae7aea1910e470281ee26.tar.gz |
C++: Synchronize function decl/def refactoring.
When editing a function declaration or definition the code model
may realize the same changes have to be applied somewhere else. A
refactoring marker will pop up that can be clicked to perform the
changes. Alternatively, press enter to apply.
Change-Id: I2299a2ecfb6a8f87d4853fc7cfa99486f890a1d3
Reviewed-on: http://codereview.qt.nokia.com/2909
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cpprefactoringchanges.h')
-rw-r--r-- | src/plugins/cpptools/cpprefactoringchanges.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cpprefactoringchanges.h b/src/plugins/cpptools/cpprefactoringchanges.h index 1e0ea6a898..c32e4e5c99 100644 --- a/src/plugins/cpptools/cpprefactoringchanges.h +++ b/src/plugins/cpptools/cpprefactoringchanges.h @@ -50,10 +50,11 @@ class CPPTOOLS_EXPORT CppRefactoringFile: public TextEditor::RefactoringFile { public: CppRefactoringFile(); - CppRefactoringFile(const QString &fileName, CppRefactoringChanges *refactoringChanges); - CppRefactoringFile(TextEditor::BaseTextEditorWidget *editor, CPlusPlus::Document::Ptr document); + CppRefactoringFile(QTextDocument *document, const QString &fileName = QString()); + CppRefactoringFile(TextEditor::BaseTextEditorWidget *editor); CPlusPlus::Document::Ptr cppDocument() const; + void setCppDocument(CPlusPlus::Document::Ptr document); CPlusPlus::Scope *scopeAt(unsigned index) const; @@ -76,10 +77,15 @@ public: using TextEditor::RefactoringFile::textOf; QString textOf(const CPlusPlus::AST *ast) const; +protected: + CppRefactoringFile(const QString &fileName, CppRefactoringChanges *refactoringChanges); + private: CppRefactoringChanges *refactoringChanges() const; mutable CPlusPlus::Document::Ptr m_cppDocument; + + friend class CppRefactoringChanges; // for access to constructor }; class CPPTOOLS_EXPORT CppRefactoringChanges: public TextEditor::RefactoringChanges |