summaryrefslogtreecommitdiff
path: root/src/plugins/pythoneditor/pythoneditorwidget.cpp
diff options
context:
space:
mode:
authorhjk <hjk121@nokiamail.com>2014-08-18 17:49:04 +0200
committerhjk <hjk121@nokiamail.com>2014-08-19 09:19:33 +0200
commitd2ec7d80d92952262b164068b52f63e39e259f7c (patch)
treee94901bd52bc8ee96f7c8685633dab25d0bb6d59 /src/plugins/pythoneditor/pythoneditorwidget.cpp
parent2c5231b46881009625350cd5fe7383f12a323fa7 (diff)
downloadqt-creator-d2ec7d80d92952262b164068b52f63e39e259f7c.tar.gz
TextEditor: Merge the two sets of *EditorWidget constructors
Change-Id: I45d87d0be722ac36d64af222f03f8cb76242c9df Reviewed-by: Christian Stenger <christian.stenger@digia.com>
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()