diff options
Diffstat (limited to 'src/plugins/texteditor/syntaxhighlighter.cpp')
-rw-r--r-- | src/plugins/texteditor/syntaxhighlighter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index a7c1a8fecb5..76008dc9735 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -36,8 +36,6 @@ #include <QPointer> #include <qtimer.h> -#include <math.h> - namespace TextEditor { class SyntaxHighlighterPrivate @@ -690,8 +688,8 @@ void SyntaxHighlighter::setExtraFormats(const QTextBlock &block, previousSemanticFormats.reserve(all.size()); formatsToApply.reserve(all.size() + formats.size()); - for (int i = 0, ei = formats.size(); i < ei; ++i) - formats[i].format.setProperty(QTextFormat::UserProperty, true); + for (auto &format : formats) + format.format.setProperty(QTextFormat::UserProperty, true); foreach (const QTextLayout::FormatRange &r, all) { if (r.format.hasProperty(QTextFormat::UserProperty)) |