forked from qt-creator/qt-creator
TextEditor: Move more code into RefactoringFile
We want to get rid of RefactoringChangesData. Change-Id: Ia428563a0ff70ec9660761beac3eb7168b8e9eca Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -72,8 +72,9 @@ protected:
|
||||
const QSharedPointer<RefactoringChangesData> &data);
|
||||
|
||||
QTextDocument *mutableDocument() const;
|
||||
|
||||
// derived classes may want to clear language specific extra data
|
||||
virtual void fileChanged();
|
||||
virtual void fileChanged() {}
|
||||
|
||||
enum IndentType {Indent, Reindent};
|
||||
void indentOrReindent(const RefactoringSelections &ranges, IndentType indent);
|
||||
@@ -81,6 +82,11 @@ protected:
|
||||
void setupFormattingRanges(const QList<Utils::ChangeSet::EditOp> &replaceList);
|
||||
void doFormatting();
|
||||
|
||||
virtual void indentSelection(const QTextCursor &selection,
|
||||
const TextDocument *textDocument) const;
|
||||
virtual void reindentSelection(const QTextCursor &selection,
|
||||
const TextDocument *textDocument) const;
|
||||
|
||||
Utils::FilePath m_filePath;
|
||||
QSharedPointer<RefactoringChangesData> m_data;
|
||||
mutable Utils::TextFileFormat m_textFileFormat;
|
||||
@@ -140,14 +146,6 @@ class TEXTEDITOR_EXPORT RefactoringChangesData
|
||||
public:
|
||||
RefactoringChangesData() = default;
|
||||
virtual ~RefactoringChangesData();
|
||||
|
||||
virtual void indentSelection(const QTextCursor &selection,
|
||||
const Utils::FilePath &filePath,
|
||||
const TextDocument *textEditor) const;
|
||||
virtual void reindentSelection(const QTextCursor &selection,
|
||||
const Utils::FilePath &filePath,
|
||||
const TextDocument *textEditor) const;
|
||||
virtual void fileChanged(const Utils::FilePath &filePath);
|
||||
};
|
||||
|
||||
} // namespace TextEditor
|
||||
|
||||
Reference in New Issue
Block a user