summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextengine_p.h
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-11-21 01:04:39 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-11-23 18:52:46 +0000
commitfa00afe7d760d91cf9c91f57dd2f77625e758e28 (patch)
treeb6c947fdc3f69c893592c3dd43ed8cbca0e30f43 /src/gui/text/qtextengine_p.h
parent073a16e50e5803fc92dc46bca704f8a7ef79e597 (diff)
Optimize QTextEngine::findItem() usage cases
Since the item positions are guaranteed to grow, we could safely re-use the obtained first item while looking for the last item in the chain. Change-Id: I5e42f5de820c62a51a109a4b227b031c697aa898 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/gui/text/qtextengine_p.h')
-rw-r--r--src/gui/text/qtextengine_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index dbe8e1ee2b..39c228fd52 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -512,7 +512,7 @@ public:
void freeMemory();
- int findItem(int strPos) const;
+ int findItem(int strPos, int firstItem = 0) const;
inline QTextFormatCollection *formatCollection() const {
if (block.docHandle())
return block.docHandle()->formatCollection();