forked from qt-creator/qt-creator
Added getter/setters for the ChangeSet.
This commit is contained in:
@@ -612,6 +612,16 @@ bool BaseTextEditor::open(const QString &fileName)
|
|||||||
return false;
|
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()
|
Core::IFile *BaseTextEditor::file()
|
||||||
{
|
{
|
||||||
return d->m_document;
|
return d->m_document;
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ QT_END_NAMESPACE
|
|||||||
|
|
||||||
namespace Utils {
|
namespace Utils {
|
||||||
class LineColumnLabel;
|
class LineColumnLabel;
|
||||||
|
class ChangeSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace TextEditor {
|
namespace TextEditor {
|
||||||
@@ -290,6 +291,9 @@ public:
|
|||||||
static ITextEditor *openEditorAt(const QString &fileName, int line, int column = 0,
|
static ITextEditor *openEditorAt(const QString &fileName, int line, int column = 0,
|
||||||
const QString &editorKind = QString());
|
const QString &editorKind = QString());
|
||||||
|
|
||||||
|
const Utils::ChangeSet &changeSet() const;
|
||||||
|
void setChangeSet(const Utils::ChangeSet &changeSet);
|
||||||
|
|
||||||
// EditorInterface
|
// EditorInterface
|
||||||
Core::IFile * file();
|
Core::IFile * file();
|
||||||
bool createNew(const QString &contents);
|
bool createNew(const QString &contents);
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "basetexteditor.h"
|
#include "basetexteditor.h"
|
||||||
#include "texteditoroverlay.h"
|
#include "texteditoroverlay.h"
|
||||||
#include <texteditor/fontsettings.h>
|
#include <texteditor/fontsettings.h>
|
||||||
|
#include <utils/changeset.h>
|
||||||
|
|
||||||
#include <QtCore/QBasicTimer>
|
#include <QtCore/QBasicTimer>
|
||||||
#include <QtCore/QSharedData>
|
#include <QtCore/QSharedData>
|
||||||
@@ -167,6 +168,8 @@ public:
|
|||||||
bool m_autoParenthesesEnabled;
|
bool m_autoParenthesesEnabled;
|
||||||
QTimer *m_updateTimer;
|
QTimer *m_updateTimer;
|
||||||
|
|
||||||
|
Utils::ChangeSet m_changeSet;
|
||||||
|
|
||||||
// parentheses matcher
|
// parentheses matcher
|
||||||
bool m_formatRange;
|
bool m_formatRange;
|
||||||
QTextCharFormat m_matchFormat;
|
QTextCharFormat m_matchFormat;
|
||||||
|
|||||||
Reference in New Issue
Block a user