TextEditor: Use more direct approach for fallback IEditor construction

There are still a few places where the EditorWidget is the primary
object, or several of them per "visible" IEditor (e.g. Diff).
Provide a means to streamline setup there, too.

Change-Id: I14cfbd68e555ebc539e707032a0e5bef563e0a36
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
hjk
2014-08-28 18:46:39 +02:00
parent 92cab936b9
commit ec5ea375e0
9 changed files with 40 additions and 80 deletions

View File

@@ -83,7 +83,6 @@ public slots:
void setDisplaySettings(const DisplaySettings &ds);
protected:
BaseTextEditor *createEditor() { return new BaseTextEditor; }
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
@@ -98,7 +97,8 @@ private:
DescriptionEditorWidget::DescriptionEditorWidget(QWidget *parent)
: BaseTextEditorWidget(parent)
{
setSimpleTextDocument("DiffEditor.DescriptionEditor");
setupFallBackEditor("DiffEditor.DescriptionEditor");
DisplaySettings settings = displaySettings();
settings.m_textWrapping = false;
settings.m_displayLineNumbers = false;