diff options
Diffstat (limited to 'src/plugins/pythoneditor/pythoneditorfactory.cpp')
-rw-r--r-- | src/plugins/pythoneditor/pythoneditorfactory.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/pythoneditor/pythoneditorfactory.cpp b/src/plugins/pythoneditor/pythoneditorfactory.cpp index 483309899c..8a3c19e232 100644 --- a/src/plugins/pythoneditor/pythoneditorfactory.cpp +++ b/src/plugins/pythoneditor/pythoneditorfactory.cpp @@ -31,6 +31,7 @@ #include "pythoneditorconstants.h" #include "pythoneditorwidget.h" #include "pythoneditorplugin.h" +#include "tools/pythonindenter.h" #include <coreplugin/icore.h> #include <coreplugin/editormanager/editormanager.h> @@ -39,6 +40,8 @@ #include <QDebug> +using namespace TextEditor; + namespace PythonEditor { namespace Internal { @@ -57,7 +60,10 @@ EditorFactory::EditorFactory(QObject *parent) Core::IEditor *EditorFactory::createEditor() { - PythonEditorWidget *widget = new PythonEditorWidget(); + auto doc = new BaseTextDocument; + doc->setId(Constants::C_PYTHONEDITOR_ID); + doc->setIndenter(new PythonIndenter); + PythonEditorWidget *widget = new PythonEditorWidget(doc, 0); TextEditor::TextEditorSettings::initializeEditor(widget); return widget->editor(); |