Editors: Remove BaseTextEditorWidget::setBaseTextDocument

First step in never changing the text document after construction,
because that is actually not really supported.
Second step will be to fix that for the editor duplicate() methods too.

Change-Id: I3d112ba0895e7ee7ac6dd8ae2318f0de7d2cebc9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Eike Ziller
2014-01-09 14:47:00 +01:00
parent 498d198104
commit a3608f595a
11 changed files with 38 additions and 35 deletions

View File

@@ -130,7 +130,8 @@ class TEXTEDITOR_EXPORT BaseTextEditorWidget : public QPlainTextEdit
Q_PROPERTY(int verticalBlockSelectionLastColumn READ verticalBlockSelectionLastColumn)
public:
BaseTextEditorWidget(QWidget *parent);
BaseTextEditorWidget(QWidget *parent = 0);
BaseTextEditorWidget(BaseTextDocument *doc, QWidget *parent = 0);
~BaseTextEditorWidget();
const Utils::ChangeSet &changeSet() const;
@@ -359,8 +360,6 @@ public:
void duplicateFrom(BaseTextEditorWidget *editor);
protected:
void setBaseTextDocument(const QSharedPointer<BaseTextDocument> &doc);
void setDefaultPath(const QString &defaultPath);
virtual BaseTextEditor *createEditor() = 0;
@@ -538,6 +537,7 @@ signals:
void requestBlockUpdate(const QTextBlock &);
private:
void ctor(const QSharedPointer<BaseTextDocument> &doc);
void indentOrUnindent(bool doIndent);
void handleHomeKey(bool anchor);
void handleBackspaceKey();