summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor/pythoneditorwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorwidget.cpp')
-rw-r--r--src/plugins/pythoneditor/pythoneditorwidget.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorwidget.cpp b/src/plugins/pythoneditor/pythoneditorwidget.cpp
index 08e1f35258..4a8d1edf59 100644
--- a/src/plugins/pythoneditor/pythoneditorwidget.cpp
+++ b/src/plugins/pythoneditor/pythoneditorwidget.cpp
@@ -47,25 +47,14 @@
namespace PythonEditor {
namespace Internal {
-PythonEditorWidget::PythonEditorWidget(TextEditor::BaseTextDocument *doc, QWidget *parent)
- : TextEditor::BaseTextEditorWidget(doc, parent)
-{
- ctor();
-}
-
-PythonEditorWidget::PythonEditorWidget(PythonEditorWidget *other)
- : TextEditor::BaseTextEditorWidget(other)
-{
- ctor();
-}
-
-void PythonEditorWidget::ctor()
+PythonEditorWidget::PythonEditorWidget(TextEditor::BaseTextDocumentPtr doc)
{
+ setTextDocument(doc);
setParenthesesMatchingEnabled(true);
setMarksVisible(true);
setCodeFoldingSupported(true);
- new PythonHighlighter(textDocument());
+ new PythonHighlighter(doc.data());
}
TextEditor::BaseTextEditor *PythonEditorWidget::createEditor()