summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextobject.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2014-02-20 17:16:29 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-20 21:34:44 +0100
commitef2527df6803f43519a84c15f6bf2ff9f69ef25c (patch)
tree0cd5c3380118e51010a1137a3c2fc294b3e7c23b /src/gui/text/qtextobject.cpp
parent42afcfd8ce2fec86836d2414ee1e6d88f42613f3 (diff)
QTextObject: replace a use of an inefficient QList with QVector
The QTextLayout::FormatRange is larger than void* and thus should not be held in QList. Use a QVector instead. This is public, but as of yet unreleased API. Change-Id: Ie04a561b43c91c3b2befb3cac2981821f84d5f77 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui/text/qtextobject.cpp')
-rw-r--r--src/gui/text/qtextobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index bd1e970583..c0342c0d4e 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -1242,9 +1242,9 @@ QString QTextBlock::text() const
\sa charFormat(), blockFormat()
*/
-QList<QTextLayout::FormatRange> QTextBlock::textFormats() const
+QVector<QTextLayout::FormatRange> QTextBlock::textFormats() const
{
- QList<QTextLayout::FormatRange> formats;
+ QVector<QTextLayout::FormatRange> formats;
if (!p || !n)
return formats;