Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
759ff3b4
You need to sign in or sign up before continuing.
Commit
759ff3b4
authored
15 years ago
by
Thorbjørn Lindeijer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed typo highightLine -> highlightLine
parent
55302393
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/cppeditor/cpphighlighter.cpp
+9
-9
9 additions, 9 deletions
src/plugins/cppeditor/cpphighlighter.cpp
src/plugins/cppeditor/cpphighlighter.h
+2
-2
2 additions, 2 deletions
src/plugins/cppeditor/cpphighlighter.h
with
11 additions
and
11 deletions
src/plugins/cppeditor/cpphighlighter.cpp
+
9
−
9
View file @
759ff3b4
...
...
@@ -117,7 +117,7 @@ void CppHighlighter::highlightBlock(const QString &text)
highlightAsPreprocessor
=
false
;
if
(
i
==
0
&&
tk
.
is
(
T_POUND
))
{
highightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppPreprocessorFormat
]);
high
l
ightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppPreprocessorFormat
]);
highlightAsPreprocessor
=
true
;
}
else
if
(
highlightCurrentWordAsPreprocessor
&&
...
...
@@ -129,15 +129,15 @@ void CppHighlighter::highlightBlock(const QString &text)
else
if
(
tk
.
is
(
T_STRING_LITERAL
)
||
tk
.
is
(
T_CHAR_LITERAL
)
||
tk
.
is
(
T_ANGLE_STRING_LITERAL
)
||
tk
.
is
(
T_AT_STRING_LITERAL
))
highightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppStringFormat
]);
high
l
ightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppStringFormat
]);
else
if
(
tk
.
is
(
T_WIDE_STRING_LITERAL
)
||
tk
.
is
(
T_WIDE_CHAR_LITERAL
))
highightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppStringFormat
]);
high
l
ightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppStringFormat
]);
else
if
(
tk
.
isComment
())
{
if
(
tk
.
is
(
T_COMMENT
)
||
tk
.
is
(
T_CPP_COMMENT
))
highightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppCommentFormat
]);
high
l
ightLine
(
text
,
tk
.
position
(),
tk
.
length
(),
m_formats
[
CppCommentFormat
]);
else
// a doxygen comment
highlightDoxygenComment
(
text
,
tk
.
position
(),
tk
.
length
());
...
...
@@ -174,7 +174,7 @@ void CppHighlighter::highlightBlock(const QString &text)
const
SimpleToken
tk
=
tokens
.
last
();
const
int
lastTokenEnd
=
tk
.
position
()
+
tk
.
length
();
if
(
text
.
length
()
>
lastTokenEnd
)
highightLine
(
text
,
lastTokenEnd
,
text
.
length
()
-
lastTokenEnd
,
QTextCharFormat
());
high
l
ightLine
(
text
,
lastTokenEnd
,
text
.
length
()
-
lastTokenEnd
,
QTextCharFormat
());
}
if
(
TextBlockUserData
*
userData
=
TextEditDocumentLayout
::
testUserData
(
currentBlock
()))
{
...
...
@@ -327,8 +327,8 @@ bool CppHighlighter::isQtKeyword(const QStringRef &text) const
return
false
;
}
void
CppHighlighter
::
highightLine
(
const
QString
&
text
,
int
position
,
int
length
,
const
QTextCharFormat
&
format
)
void
CppHighlighter
::
high
l
ightLine
(
const
QString
&
text
,
int
position
,
int
length
,
const
QTextCharFormat
&
format
)
{
const
QTextCharFormat
visualSpaceFormat
=
m_formats
[
CppVisualWhitespace
];
...
...
@@ -384,7 +384,7 @@ void CppHighlighter::highlightDoxygenComment(const QString &text, int position,
int
k
=
CppTools
::
classifyDoxygenTag
(
start
,
it
-
start
);
if
(
k
!=
CppTools
::
T_DOXY_IDENTIFIER
)
{
highightLine
(
text
,
initial
,
start
-
uc
-
initial
,
format
);
high
l
ightLine
(
text
,
initial
,
start
-
uc
-
initial
,
format
);
setFormat
(
start
-
uc
-
1
,
it
-
start
+
1
,
kwFormat
);
initial
=
it
-
uc
;
}
...
...
@@ -392,6 +392,6 @@ void CppHighlighter::highlightDoxygenComment(const QString &text, int position,
++
it
;
}
highightLine
(
text
,
initial
,
it
-
uc
-
initial
,
format
);
high
l
ightLine
(
text
,
initial
,
it
-
uc
-
initial
,
format
);
}
This diff is collapsed.
Click to expand it.
src/plugins/cppeditor/cpphighlighter.h
+
2
−
2
View file @
759ff3b4
...
...
@@ -57,8 +57,8 @@ public:
private
:
void
highlightWord
(
QStringRef
word
,
int
position
,
int
length
);
void
highightLine
(
const
QString
&
line
,
int
position
,
int
length
,
const
QTextCharFormat
&
format
);
void
high
l
ightLine
(
const
QString
&
line
,
int
position
,
int
length
,
const
QTextCharFormat
&
format
);
void
highlightDoxygenComment
(
const
QString
&
text
,
int
position
,
int
length
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment