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/texteditor/refactoringchanges.h | |
parent | 13c8f9eaaae4adf7d4dc92cc6cb1f0d5cd3995b0 (diff) |
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/texteditor/refactoringchanges.h')
-rw-r--r-- | src/plugins/texteditor/refactoringchanges.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/texteditor/refactoringchanges.h b/src/plugins/texteditor/refactoringchanges.h index f291d390c19..6dae8c57d8b 100644 --- a/src/plugins/texteditor/refactoringchanges.h +++ b/src/plugins/texteditor/refactoringchanges.h @@ -52,7 +52,9 @@ public: public: RefactoringFile(); - RefactoringFile(const QString &fileName, RefactoringChanges *refactoringChanges); + // takes ownership of document + RefactoringFile(QTextDocument *document, const QString &fileName = QString()); + RefactoringFile(BaseTextEditorWidget *editor); RefactoringFile(const RefactoringFile &other); virtual ~RefactoringFile(); @@ -76,6 +78,7 @@ protected: // not assignable //const RefactoringFile &operator=(const RefactoringFile &other); + RefactoringFile(const QString &fileName, RefactoringChanges *refactoringChanges); QTextDocument *mutableDocument() const; protected: @@ -86,6 +89,8 @@ protected: Utils::ChangeSet m_changes; QList<Range> m_indentRanges; bool m_openEditor; + + friend class RefactoringChanges; // access to constructor }; /*! |