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
3ab927ed
Commit
3ab927ed
authored
Aug 09, 2010
by
Roberto Raggi
Browse files
Made the highlighting for virtual methods configurable
parent
3ae8ddf1
Changes
3
Show whitespace changes
Inline
Side-by-side
src/plugins/cppeditor/cppeditor.cpp
View file @
3ab927ed
...
@@ -1742,8 +1742,7 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs)
...
@@ -1742,8 +1742,7 @@ void CPPEditor::setFontSettings(const TextEditor::FontSettings &fs)
m_localFormat
=
fs
.
toTextCharFormat
(
QLatin1String
(
TextEditor
::
Constants
::
C_LOCAL
));
m_localFormat
=
fs
.
toTextCharFormat
(
QLatin1String
(
TextEditor
::
Constants
::
C_LOCAL
));
m_fieldFormat
=
fs
.
toTextCharFormat
(
QLatin1String
(
TextEditor
::
Constants
::
C_FIELD
));
m_fieldFormat
=
fs
.
toTextCharFormat
(
QLatin1String
(
TextEditor
::
Constants
::
C_FIELD
));
m_keywordFormat
=
fs
.
toTextCharFormat
(
QLatin1String
(
TextEditor
::
Constants
::
C_KEYWORD
));
m_keywordFormat
=
fs
.
toTextCharFormat
(
QLatin1String
(
TextEditor
::
Constants
::
C_KEYWORD
));
m_virtualMethodFormat
=
fs
.
toTextCharFormat
(
QLatin1String
(
TextEditor
::
Constants
::
C_VIRTUAL_METHOD
));
m_virtualMethodFormat
.
setFontItalic
(
true
);
// ### hardcoded
// only set the background, we do not want to modify foreground properties set by the syntax highlighter or the link
// only set the background, we do not want to modify foreground properties set by the syntax highlighter or the link
m_occurrencesFormat
.
clearForeground
();
m_occurrencesFormat
.
clearForeground
();
...
...
src/plugins/texteditor/texteditorconstants.h
View file @
3ab927ed
...
@@ -110,6 +110,7 @@ const char * const C_STRING = "String";
...
@@ -110,6 +110,7 @@ const char * const C_STRING = "String";
const
char
*
const
C_TYPE
=
"Type"
;
const
char
*
const
C_TYPE
=
"Type"
;
const
char
*
const
C_LOCAL
=
"Local"
;
const
char
*
const
C_LOCAL
=
"Local"
;
const
char
*
const
C_FIELD
=
"Field"
;
const
char
*
const
C_FIELD
=
"Field"
;
const
char
*
const
C_VIRTUAL_METHOD
=
"VirtualMethod"
;
const
char
*
const
C_KEYWORD
=
"Keyword"
;
const
char
*
const
C_KEYWORD
=
"Keyword"
;
const
char
*
const
C_OPERATOR
=
"Operator"
;
const
char
*
const
C_OPERATOR
=
"Operator"
;
const
char
*
const
C_PREPROCESSOR
=
"Preprocessor"
;
const
char
*
const
C_PREPROCESSOR
=
"Preprocessor"
;
...
...
src/plugins/texteditor/texteditorsettings.cpp
View file @
3ab927ed
...
@@ -128,6 +128,11 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
...
@@ -128,6 +128,11 @@ TextEditorSettings::TextEditorSettings(QObject *parent)
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_TYPE
),
tr
(
"Type"
),
Qt
::
darkMagenta
));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_TYPE
),
tr
(
"Type"
),
Qt
::
darkMagenta
));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_LOCAL
),
tr
(
"Local"
)));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_LOCAL
),
tr
(
"Local"
)));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_FIELD
),
tr
(
"Field"
),
Qt
::
darkRed
));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_FIELD
),
tr
(
"Field"
),
Qt
::
darkRed
));
FormatDescription
virtualMethodFormatDescriptor
(
QLatin1String
(
C_VIRTUAL_METHOD
),
tr
(
"Virtual Method"
));
virtualMethodFormatDescriptor
.
format
().
setItalic
(
true
);
formatDescriptions
.
append
(
virtualMethodFormatDescriptor
);
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_KEYWORD
),
tr
(
"Keyword"
),
Qt
::
darkYellow
));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_KEYWORD
),
tr
(
"Keyword"
),
Qt
::
darkYellow
));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_OPERATOR
),
tr
(
"Operator"
)));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_OPERATOR
),
tr
(
"Operator"
)));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_PREPROCESSOR
),
tr
(
"Preprocessor"
),
Qt
::
darkBlue
));
formatDescriptions
.
append
(
FormatDescription
(
QLatin1String
(
C_PREPROCESSOR
),
tr
(
"Preprocessor"
),
Qt
::
darkBlue
));
...
...
Write
Preview
Supports
Markdown
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