forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user