aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/syntaxhighlighter.cpp
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2018-11-25 18:52:41 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2018-11-30 17:35:18 +0000
commit2e2059e8b52fb53b0ce34a12ce7a7da08423aac9 (patch)
treecb8fcd030de0d4feda2805f87433e4f0d8d8f42d /src/plugins/texteditor/syntaxhighlighter.cpp
parenta9fa1fe5b1f16281ba7eaec457093dd811407e1c (diff)
TextEditor: Modernize
modernize-* Change-Id: Ic497fea1942a77cf017be3b0033f92e3807066f1 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/texteditor/syntaxhighlighter.cpp')
-rw-r--r--src/plugins/texteditor/syntaxhighlighter.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp
index a7c1a8fecb..76008dc973 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))