forked from qt-creator/qt-creator
QmlJSEditor: Modernize
modernize-* Change-Id: I4dceb82c3904069a0d9848b2af61122d9282cb36 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -45,9 +45,7 @@ QmlJSHighlighter::QmlJSHighlighter(QTextDocument *parent)
|
||||
setDefaultTextFormatCategories();
|
||||
}
|
||||
|
||||
QmlJSHighlighter::~QmlJSHighlighter()
|
||||
{
|
||||
}
|
||||
QmlJSHighlighter::~QmlJSHighlighter() = default;
|
||||
|
||||
bool QmlJSHighlighter::isQmlEnabled() const
|
||||
{
|
||||
@@ -167,8 +165,7 @@ void QmlJSHighlighter::highlightBlock(const QString &text)
|
||||
}
|
||||
|
||||
int previousTokenEnd = 0;
|
||||
for (int index = 0; index < tokens.size(); ++index) {
|
||||
const Token &token = tokens.at(index);
|
||||
for (const auto &token : tokens) {
|
||||
setFormat(previousTokenEnd, token.begin() - previousTokenEnd, formatForCategory(C_VISUAL_WHITESPACE));
|
||||
|
||||
switch (token.kind) {
|
||||
|
||||
Reference in New Issue
Block a user