diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-11-22 06:03:52 +0400 |
---|---|---|
committer | Konstantin Ritt <ritt.ks@gmail.com> | 2014-12-14 05:29:25 +0100 |
commit | a69b2c01684756c959de7645451f02397ca19b51 (patch) | |
tree | 220ffaf0e8211234007f982a5a945457f531ec6a /src/gui/text/qstatictext_p.h | |
parent | 5c5e4582d60ce38868e838bced73f52febec5841 (diff) |
[QStaticTextItem] Drop unused members
The QStaticTextItem's `chars` and `numChars` members are never used,
even when set. In fact, there is nothing useful we can do with the input
string in the absence of clusters mapping.
Change-Id: I81fcbce3e575f4d0dcfc2515286d512b858f592b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qstatictext_p.h')
-rw-r--r-- | src/gui/text/qstatictext_p.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h index 29db8836d9..694a2e4baa 100644 --- a/src/gui/text/qstatictext_p.h +++ b/src/gui/text/qstatictext_p.h @@ -70,7 +70,7 @@ public: class Q_GUI_EXPORT QStaticTextItem { public: - QStaticTextItem() : chars(0), numChars(0), useBackendOptimizations(false), + QStaticTextItem() : useBackendOptimizations(false), userDataNeedsUpdate(0), usesRawFont(0), m_fontEngine(0), m_userData(0) {} @@ -83,9 +83,7 @@ public: { glyphPositions = other.glyphPositions; glyphs = other.glyphs; - chars = other.chars; numGlyphs = other.numGlyphs; - numChars = other.numChars; font = other.font; color = other.color; useBackendOptimizations = other.useBackendOptimizations; @@ -125,28 +123,22 @@ public: glyph_t *glyphs; // 4 bytes per glyph int glyphOffset; }; - union { - QChar *chars; // 2 bytes per glyph - int charOffset; - }; // ================= - // 14 bytes per glyph + // 12 bytes per glyph - // 12 bytes for pointers + // 8 bytes for pointers int numGlyphs; // 4 bytes per item - int numChars; // 4 bytes per item QFont font; // 8 bytes per item QColor color; // 10 bytes per item char useBackendOptimizations : 1; // 1 byte per item char userDataNeedsUpdate : 1; // char usesRawFont : 1; // - // ================ - // 51 bytes per item private: // Needs special handling in setters, so private to avoid abuse QFontEngine *m_fontEngine; // 4 bytes per item QStaticTextUserData *m_userData; // 8 bytes per item - + // ================ + // 43 bytes per item }; class QStaticText; @@ -179,7 +171,6 @@ public: glyph_t *glyphPool; // 4 bytes per text QFixedPoint *positionPool; // 4 bytes per text - QChar *charPool; // 4 bytes per text QTextOption textOption; // 28 bytes per text @@ -188,7 +179,7 @@ public: unsigned char textFormat : 2; unsigned char untransformedCoordinates : 1; // ================ - // 195 bytes per text + // 191 bytes per text static QStaticTextPrivate *get(const QStaticText *q); }; |