TextEditor: Modernize

modernize-*

Change-Id: Ic497fea1942a77cf017be3b0033f92e3807066f1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2018-11-25 18:52:41 +01:00
parent a9fa1fe5b1
commit 2e2059e8b5
62 changed files with 167 additions and 222 deletions

View File

@@ -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))