~bzoltan/kubuntu-packaging/decouple_cmake_plugin

« back to all changes in this revision

Viewing changes to src/plugins/cppeditor/cppsnippetprovider.cpp

  • Committer: Timo Jyrinki
  • Date: 2013-11-15 12:25:23 UTC
  • mfrom: (1.1.28)
  • Revision ID: timo.jyrinki@canonical.com-20131115122523-i2kyamsu4gs2mu1m
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
#include <cpptools/cppqtstyleindenter.h>
38
38
 
39
 
#include <texteditor/texteditorsettings.h>
40
 
#include <texteditor/fontsettings.h>
41
39
#include <texteditor/snippets/snippeteditor.h>
42
40
 
43
41
#include <QLatin1String>
65
63
 
66
64
void CppSnippetProvider::decorateEditor(TextEditor::SnippetEditorWidget *editor) const
67
65
{
68
 
    CppHighlighter *highlighter = new CppHighlighter;
69
 
    const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::instance()->fontSettings();
70
 
    const QVector<QTextCharFormat> &formats =
71
 
        fs.toTextCharFormats(CPPEditorWidget::highlighterFormatCategories());
72
 
    highlighter->setFormats(formats.constBegin(), formats.constEnd());
73
 
    editor->setSyntaxHighlighter(highlighter);
 
66
    editor->setSyntaxHighlighter(new CppHighlighter);
74
67
    editor->setIndenter(new CppTools::CppQtStyleIndenter);
75
68
    editor->setAutoCompleter(new CppAutoCompleter);
76
69
}