From f5b0bd32b20fc1e37f95b412252b597b9936dda7 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 31 Jul 2014 14:44:42 +0200 Subject: TextEditor: Remove one stack of EditorWidget constructors There are conceptually only two: one that operates a new document, and one that shares one. Being explicit makes moving data over to the Editor hierarchy easier. Convenience can be re-added there, later. Change-Id: I9b34ff26628c99ffff01201dcf99332d5e7253e9 Reviewed-by: Christian Stenger Reviewed-by: hjk --- src/plugins/pythoneditor/pythoneditorwidget.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/plugins/pythoneditor/pythoneditorwidget.cpp') diff --git a/src/plugins/pythoneditor/pythoneditorwidget.cpp b/src/plugins/pythoneditor/pythoneditorwidget.cpp index 495ba2158d..2fcf5a2c6e 100644 --- a/src/plugins/pythoneditor/pythoneditorwidget.cpp +++ b/src/plugins/pythoneditor/pythoneditorwidget.cpp @@ -35,7 +35,6 @@ #include "pythoneditorwidget.h" #include "tools/pythonhighlighter.h" -#include "tools/pythonindenter.h" #include "pythoneditor.h" #include "pythoneditorconstants.h" @@ -48,11 +47,9 @@ namespace PythonEditor { namespace Internal { -PythonEditorWidget::PythonEditorWidget(QWidget *parent) - : TextEditor::BaseTextEditorWidget(parent) +PythonEditorWidget::PythonEditorWidget(TextEditor::BaseTextDocument *doc, QWidget *parent) + : TextEditor::BaseTextEditorWidget(doc, parent) { - baseTextDocument()->setId(Constants::C_PYTHONEDITOR_ID); - baseTextDocument()->setIndenter(new PythonIndenter()); ctor(); } -- cgit v1.2.1