Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
a9977495
Commit
a9977495
authored
Nov 09, 2010
by
Leandro Melo
Browse files
Snippets: Set auto-completers.
parent
212e39a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppsnippeteditordecorator.cpp
View file @
a9977495
...
...
@@ -31,6 +31,7 @@
#include "cpphighlighter.h"
#include "cppeditor.h"
#include "cppqtstyleindenter.h"
#include "cppautocompleter.h"
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
...
...
@@ -62,6 +63,6 @@ void CppSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
fs
.
toTextCharFormats
(
CPPEditor
::
highlighterFormatCategories
());
highlighter
->
setFormats
(
formats
.
constBegin
(),
formats
.
constEnd
());
editor
->
installSyntaxHighlighter
(
highlighter
);
editor
->
setIndenter
(
new
CppQtStyleIndenter
);
editor
->
setAutoCompleter
(
new
CppAutoCompleter
);
}
src/plugins/qmljseditor/qmljssnippeteditordecorator.cpp
View file @
a9977495
...
...
@@ -31,6 +31,7 @@
#include "qmljshighlighter.h"
#include "qmljseditor.h"
#include "qmljsindenter.h"
#include "qmljsautocompleter.h"
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
...
...
@@ -60,6 +61,6 @@ void QmlJSSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
const
TextEditor
::
FontSettings
&
fs
=
TextEditor
::
TextEditorSettings
::
instance
()
->
fontSettings
();
highlighter
->
setFormats
(
fs
.
toTextCharFormats
(
QmlJSTextEditor
::
highlighterFormatCategories
()));
editor
->
installSyntaxHighlighter
(
highlighter
);
editor
->
setIndenter
(
new
Indenter
);
editor
->
setAutoCompleter
(
new
AutoCompleter
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment