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
Tobias Hunger
qt-creator
Commits
44ffd76e
Commit
44ffd76e
authored
Nov 09, 2010
by
Leandro Melo
Browse files
Snippets: Rename a method in the snippet editor.
parent
a9977495
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppsnippeteditordecorator.cpp
View file @
44ffd76e
...
...
@@ -62,7 +62,7 @@ void CppSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
const
QVector
<
QTextCharFormat
>
&
formats
=
fs
.
toTextCharFormats
(
CPPEditor
::
highlighterFormatCategories
());
highlighter
->
setFormats
(
formats
.
constBegin
(),
formats
.
constEnd
());
editor
->
install
SyntaxHighlighter
(
highlighter
);
editor
->
set
SyntaxHighlighter
(
highlighter
);
editor
->
setIndenter
(
new
CppQtStyleIndenter
);
editor
->
setAutoCompleter
(
new
CppAutoCompleter
);
}
src/plugins/qmljseditor/qmljssnippeteditordecorator.cpp
View file @
44ffd76e
...
...
@@ -60,7 +60,7 @@ void QmlJSSnippetEditorDecorator::apply(TextEditor::SnippetEditor *editor) const
Highlighter
*
highlighter
=
new
Highlighter
;
const
TextEditor
::
FontSettings
&
fs
=
TextEditor
::
TextEditorSettings
::
instance
()
->
fontSettings
();
highlighter
->
setFormats
(
fs
.
toTextCharFormats
(
QmlJSTextEditor
::
highlighterFormatCategories
()));
editor
->
install
SyntaxHighlighter
(
highlighter
);
editor
->
set
SyntaxHighlighter
(
highlighter
);
editor
->
setIndenter
(
new
Indenter
);
editor
->
setAutoCompleter
(
new
AutoCompleter
);
}
src/plugins/texteditor/snippets/snippeteditor.cpp
View file @
44ffd76e
...
...
@@ -61,7 +61,7 @@ SnippetEditor::SnippetEditor(QWidget *parent) : BaseTextEditor(parent)
SnippetEditor
::~
SnippetEditor
()
{}
void
SnippetEditor
::
install
SyntaxHighlighter
(
TextEditor
::
SyntaxHighlighter
*
highlighter
)
void
SnippetEditor
::
set
SyntaxHighlighter
(
TextEditor
::
SyntaxHighlighter
*
highlighter
)
{
baseTextDocument
()
->
setSyntaxHighlighter
(
highlighter
);
}
...
...
src/plugins/texteditor/snippets/snippeteditor.h
View file @
44ffd76e
...
...
@@ -70,7 +70,7 @@ public:
SnippetEditor
(
QWidget
*
parent
);
virtual
~
SnippetEditor
();
void
install
SyntaxHighlighter
(
SyntaxHighlighter
*
highlighter
);
void
set
SyntaxHighlighter
(
SyntaxHighlighter
*
highlighter
);
signals:
void
snippetContentChanged
();
...
...
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