diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index e9958040a2b..5318f7849ed 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -612,6 +612,16 @@ bool BaseTextEditor::open(const QString &fileName) return false; } +const Utils::ChangeSet &BaseTextEditor::changeSet() const +{ + return d->m_changeSet; +} + +void BaseTextEditor::setChangeSet(const Utils::ChangeSet &changeSet) +{ + d->m_changeSet = changeSet; +} + Core::IFile *BaseTextEditor::file() { return d->m_document; diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index 5624a4ca081..a9495b747e8 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -46,6 +46,7 @@ QT_END_NAMESPACE namespace Utils { class LineColumnLabel; + class ChangeSet; } namespace TextEditor { @@ -290,6 +291,9 @@ public: static ITextEditor *openEditorAt(const QString &fileName, int line, int column = 0, const QString &editorKind = QString()); + const Utils::ChangeSet &changeSet() const; + void setChangeSet(const Utils::ChangeSet &changeSet); + // EditorInterface Core::IFile * file(); bool createNew(const QString &contents); diff --git a/src/plugins/texteditor/basetexteditor_p.h b/src/plugins/texteditor/basetexteditor_p.h index 613e82fea2f..f7c7ed3a6b8 100644 --- a/src/plugins/texteditor/basetexteditor_p.h +++ b/src/plugins/texteditor/basetexteditor_p.h @@ -33,6 +33,7 @@ #include "basetexteditor.h" #include "texteditoroverlay.h" #include +#include #include #include @@ -167,6 +168,8 @@ public: bool m_autoParenthesesEnabled; QTimer *m_updateTimer; + Utils::ChangeSet m_changeSet; + // parentheses matcher bool m_formatRange; QTextCharFormat m_matchFormat;