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
272014a5
Commit
272014a5
authored
Jan 29, 2010
by
Roberto Raggi
Browse files
Mark the trailing whitespaces.
parent
020e7f57
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljshighlighter.cpp
View file @
272014a5
...
...
@@ -189,11 +189,11 @@ void QScriptHighlighter::highlightBlock(const QString &text)
previousTokenEnd
=
token
.
end
();
}
setFormat
(
previousTokenEnd
,
text
.
length
()
-
previousTokenEnd
,
m_formats
[
VisualWhitespace
]);
int
firstNonSpace
=
0
;
if
(
!
tokens
.
isEmpty
())
{
const
Token
&
tk
=
tokens
.
first
();
firstNonSpace
=
tk
.
offset
;
}
if
(
!
tokens
.
isEmpty
())
firstNonSpace
=
tokens
.
first
().
offset
;
setCurrentBlockState
(
m_scanner
.
endState
());
onBlockEnd
(
m_scanner
.
endState
(),
firstNonSpace
);
...
...
src/plugins/qmljseditor/qmlhighlighter.cpp
View file @
272014a5
...
...
@@ -41,6 +41,7 @@ QmlHighlighter::QmlHighlighter(QTextDocument *parent) :
m_braceDepth
=
0
;
QSet
<
QString
>
qmlKeywords
(
keywords
());
qmlKeywords
<<
QLatin1String
(
"alias"
);
qmlKeywords
<<
QLatin1String
(
"property"
);
qmlKeywords
<<
QLatin1String
(
"signal"
);
qmlKeywords
<<
QLatin1String
(
"readonly"
);
...
...
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