diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-02-20 17:16:29 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-20 21:34:44 +0100 |
commit | ef2527df6803f43519a84c15f6bf2ff9f69ef25c (patch) | |
tree | 0cd5c3380118e51010a1137a3c2fc294b3e7c23b /src/gui/text/qtextobject.cpp | |
parent | 42afcfd8ce2fec86836d2414ee1e6d88f42613f3 (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.cpp | 4 |
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; |