Minor optimization for QTextLineItemIterator
authorKonstantin Ritt <ritt.ks@gmail.com>
Thu, 15 May 2014 09:54:54 +0000 (12:54 +0300)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 16 May 2014 19:42:45 +0000 (21:42 +0200)
commit4689a9b3f065db2364ac52e7d867f12363f16b5d
treed48943d6bf27af4150bb97c18ad9bce5563fb81f
parent7952cf7e2705bd310ad8e8d0eca85a372e669fb3
Minor optimization for QTextLineItemIterator

Don't store unused values (pos_x and levels) and re-use
already calculated ones (itemStart, itemEnd, and itemLength).
Also const-ify some members to make the code a bit more clear.

Change-Id: Ied80ebf9e4e7e8a1d057e413a9bd24f84b8aaf92
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/gui/text/qtextengine.cpp
src/gui/text/qtextengine_p.h
src/gui/text/qtextlayout.cpp