CppEditor: Move indenter construction to document constructor

A more direct approach than going through the widget's baseTextDocument,
relying on widget life time.

Change-Id: I62c10e53b1a9a1e6717c6eb3e3cc78dcbfd2868e
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-08-01 18:16:24 +02:00
parent 4a52d8216c
commit 3c3c896d55
2 changed files with 2 additions and 2 deletions

View File

@@ -33,6 +33,7 @@
#include "cpphighlighter.h"
#include <cpptools/cppcodeformatter.h>
#include <cpptools/cppqtstyleindenter.h>
#include <cpptools/cpptoolsconstants.h>
#include <QTextDocument>
@@ -48,6 +49,7 @@ CPPEditorDocument::CPPEditorDocument()
connect(this, SIGNAL(mimeTypeChanged()),
this, SLOT(onMimeTypeChanged()));
setSyntaxHighlighter(new CppHighlighter);
setIndenter(new CppTools::CppQtStyleIndenter);
onMimeTypeChanged();
}