summaryrefslogtreecommitdiff
path: root/src/plugins/texteditor/refactoringchanges.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-08-10 09:50:04 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-08-16 11:13:12 +0200
commit8f14bc0ea23495dfb1dae7aea1910e470281ee26 (patch)
tree9e0580da96ff5010d4c4b17c1ab67a709c917a31 /src/plugins/texteditor/refactoringchanges.cpp
parent13c8f9eaaae4adf7d4dc92cc6cb1f0d5cd3995b0 (diff)
downloadqt-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/texteditor/refactoringchanges.cpp')
-rw-r--r--src/plugins/texteditor/refactoringchanges.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp
index f5b4453907..60d5fb0862 100644
--- a/src/plugins/texteditor/refactoringchanges.cpp
+++ b/src/plugins/texteditor/refactoringchanges.cpp
@@ -186,6 +186,22 @@ RefactoringFile::RefactoringFile()
, m_openEditor(false)
{ }
+RefactoringFile::RefactoringFile(QTextDocument *document, const QString &fileName)
+ : m_fileName(fileName)
+ , m_refactoringChanges(0)
+ , m_document(document)
+ , m_editor(0)
+ , m_openEditor(false)
+{ }
+
+RefactoringFile::RefactoringFile(BaseTextEditorWidget *editor)
+ : m_fileName(editor->file()->fileName())
+ , m_refactoringChanges(0)
+ , m_document(0)
+ , m_editor(editor)
+ , m_openEditor(false)
+{ }
+
RefactoringFile::RefactoringFile(const QString &fileName, RefactoringChanges *refactoringChanges)
: m_fileName(fileName)
, m_refactoringChanges(refactoringChanges)