summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-01-23 12:36:42 +0100
committerEike Ziller <eike.ziller@digia.com>2014-01-24 08:00:59 +0100
commit17c11f06422666561a05a622c118b711939f2758 (patch)
treea61dcbb934479608a79fdbce9f18bf56fe720377 /src/plugins/cppeditor
parent0ec2a02fd487e3c6f13c13a63c221672b2678fd8 (diff)
downloadqt-creator-17c11f06422666561a05a622c118b711939f2758.tar.gz
TextEditors: Set syntax highlighter only once
Change-Id: Iad83e589be49aeab3f35420d071311c15ddac6b2 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'src/plugins/cppeditor')
-rw-r--r--src/plugins/cppeditor/cppeditor.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp
index 2588ce40b2..819390fad3 100644
--- a/src/plugins/cppeditor/cppeditor.cpp
+++ b/src/plugins/cppeditor/cppeditor.cpp
@@ -542,8 +542,6 @@ void CPPEditorWidget::ctor()
setCodeFoldingSupported(true);
setAutoCompleter(new CppAutoCompleter);
- baseTextDocument()->setSyntaxHighlighter(new CppHighlighter);
-
m_modelManager = CppModelManagerInterface::instance();
if (m_modelManager) {
CppEditorSupport *editorSupport = m_modelManager->cppEditorSupport(editor());
@@ -2001,6 +1999,7 @@ CPPEditorDocument::CPPEditorDocument()
{
connect(this, SIGNAL(tabSettingsChanged()),
this, SLOT(invalidateFormatterCache()));
+ setSyntaxHighlighter(new CppHighlighter);
}
void CPPEditorDocument::applyFontSettings()