Commit 44ffd76e authored by Leandro Melo's avatar Leandro Melo
Browse files

Snippets: Rename a method in the snippet editor.

parent a9977495
...@@ -62,7 +62,7 @@ void CppSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const ...@@ -62,7 +62,7 @@ void CppSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
const QVector<QTextCharFormat> &formats = const QVector<QTextCharFormat> &formats =
fs.toTextCharFormats(CPPEditor::highlighterFormatCategories()); fs.toTextCharFormats(CPPEditor::highlighterFormatCategories());
highlighter->setFormats(formats.constBegin(), formats.constEnd()); highlighter->setFormats(formats.constBegin(), formats.constEnd());
editor->installSyntaxHighlighter(highlighter); editor->setSyntaxHighlighter(highlighter);
editor->setIndenter(new CppQtStyleIndenter); editor->setIndenter(new CppQtStyleIndenter);
editor->setAutoCompleter(new CppAutoCompleter); editor->setAutoCompleter(new CppAutoCompleter);
} }
...@@ -60,7 +60,7 @@ void QmlJSSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const ...@@ -60,7 +60,7 @@ void QmlJSSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
Highlighter *highlighter = new Highlighter; Highlighter *highlighter = new Highlighter;
const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::instance()->fontSettings(); const TextEditor::FontSettings &fs = TextEditor::TextEditorSettings::instance()->fontSettings();
highlighter->setFormats(fs.toTextCharFormats(QmlJSTextEditor::highlighterFormatCategories())); highlighter->setFormats(fs.toTextCharFormats(QmlJSTextEditor::highlighterFormatCategories()));
editor->installSyntaxHighlighter(highlighter); editor->setSyntaxHighlighter(highlighter);
editor->setIndenter(new Indenter); editor->setIndenter(new Indenter);
editor->setAutoCompleter(new AutoCompleter); editor->setAutoCompleter(new AutoCompleter);
} }
...@@ -61,7 +61,7 @@ SnippetEditor::SnippetEditor(QWidget *parent) : BaseTextEditor(parent) ...@@ -61,7 +61,7 @@ SnippetEditor::SnippetEditor(QWidget *parent) : BaseTextEditor(parent)
SnippetEditor::~SnippetEditor() SnippetEditor::~SnippetEditor()
{} {}
void SnippetEditor::installSyntaxHighlighter(TextEditor::SyntaxHighlighter *highlighter) void SnippetEditor::setSyntaxHighlighter(TextEditor::SyntaxHighlighter *highlighter)
{ {
baseTextDocument()->setSyntaxHighlighter(highlighter); baseTextDocument()->setSyntaxHighlighter(highlighter);
} }
......
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
SnippetEditor(QWidget *parent); SnippetEditor(QWidget *parent);
virtual ~SnippetEditor(); virtual ~SnippetEditor();
void installSyntaxHighlighter(SyntaxHighlighter *highlighter); void setSyntaxHighlighter(SyntaxHighlighter *highlighter);
signals: signals:
void snippetContentChanged(); void snippetContentChanged();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment