diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-01-30 01:55:41 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-06 11:40:22 +0100 |
commit | f864bdaf592412acccae6b6c561a76bbfe35a1f0 (patch) | |
tree | 8c1a0c329d350fe45605d45787801b67076cfd49 /src/gui/text/qtextengine_p.h | |
parent | 903b9d41f7894610b100fd3ed9dff1ac60011fd1 (diff) |
Get rid of SpecialData::addFormatIndices
and rename SpecialData:: resolvedFormatIndices to resolvedFormats.
Instead, resolvedFormats now stores QTextCharFormat shared copies.
Change-Id: I4a22cb3f5679b980ef52d47e4e1935663dd257ea
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qtextengine_p.h')
-rw-r--r-- | src/gui/text/qtextengine_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h index d399123609..1616a78937 100644 --- a/src/gui/text/qtextengine_p.h +++ b/src/gui/text/qtextengine_p.h @@ -603,7 +603,8 @@ public: void setPreeditArea(int position, const QString &text); inline bool hasFormats() const { return block.docHandle() || (specialData && !specialData->addFormats.isEmpty()); } - QList<QTextLayout::FormatRange> additionalFormats() const; + inline QList<QTextLayout::FormatRange> additionalFormats() const + { return specialData ? specialData->addFormats : QList<QTextLayout::FormatRange>(); } void setAdditionalFormats(const QList<QTextLayout::FormatRange> &formatList); private: @@ -613,8 +614,7 @@ private: int preeditPosition; QString preeditText; QList<QTextLayout::FormatRange> addFormats; - QVector<int> addFormatIndices; - QVector<int> resolvedFormatIndices; + QVector<QTextCharFormat> resolvedFormats; // only used when no docHandle is available QScopedPointer<QTextFormatCollection> formats; }; |