summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-04 13:01:33 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-04 13:01:33 (GMT)
commit0c444f72281fded5e226ec786614595a86bff4e3 (patch)
tree9e90887978de8a60bd2c71cf6ed623505a015dde /src/gui/text
parent8701b7eb49cc1e01fc00516b792894f262ff8cff (diff)
downloadQt-0c444f72281fded5e226ec786614595a86bff4e3.zip
Qt-0c444f72281fded5e226ec786614595a86bff4e3.tar.gz
Qt-0c444f72281fded5e226ec786614595a86bff4e3.tar.bz2
Revert changes made to QTextEngine for QStaticText
Some changes were made to QTextEngine for the sake of QStaticText, but as the implementation of QStaticText changed, these are no longer needed. Although they are harmless, I'll remove them to minimize the diff.
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextengine.cpp58
-rw-r--r--src/gui/text/qtextengine_p.h11
2 files changed, 1 insertions, 68 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index b55ac68..02eae98 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -2109,19 +2109,6 @@ void QTextEngine::LayoutData::reallocate(int totalGlyphs)
allocated = newAllocated;
}
-QGlyphLayout QGlyphLayout::clone(char *address) const
-{
- QGlyphLayout layout(address, numGlyphs);
- memmove(layout.offsets, offsets, numGlyphs * sizeof(QFixedPoint));
- memmove(layout.attributes, attributes, numGlyphs * sizeof(HB_GlyphAttributes));
- memmove(layout.justifications, justifications, numGlyphs * sizeof(QGlyphJustification));
- memmove(layout.advances_y, advances_y, numGlyphs * sizeof(QFixed));
- memmove(layout.advances_x, advances_x, numGlyphs * sizeof(QFixed));
- memmove(layout.glyphs, glyphs, numGlyphs * sizeof(HB_Glyph));
-
- return layout;
-}
-
// grow to the new size, copying the existing data to the new layout
void QGlyphLayout::grow(char *address, int totalGlyphs)
{
@@ -2637,51 +2624,6 @@ QTextItemInt::QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFo
: justified(false), underlineStyle(QTextCharFormat::NoUnderline), charFormat(format),
num_chars(0), chars(0), logClusters(0), f(0), fontEngine(0)
{
- init(si, font, format);
-}
-
-QTextItemInt::QTextItemInt(const QTextItemInt &other)
- : descent(other.descent), ascent(other.ascent), width(other.width),
- flags(other.flags), justified(other.justified), underlineStyle(other.underlineStyle),
- charFormat(other.charFormat), num_chars(other.num_chars), chars(other.chars),
- fontEngine(other.fontEngine), f(other.f), glyphs(other.glyphs),
- logClusters(other.logClusters)
-{
-}
-
-
-QTextItemInt QTextItemInt::clone(char *glyphLayoutMemory, unsigned short *logClusterMemory) const
-{
- QTextItemInt ti(*this);
-
- ti.glyphs = glyphs.clone(glyphLayoutMemory);
- ti.logClusters = logClusterMemory;
- memmove(logClusterMemory, logClusters, glyphs.numGlyphs * sizeof(unsigned short));
-
- return ti;
-}
-
-QTextItemInt &QTextItemInt::operator=(const QTextItemInt &other)
-{
- descent = other.descent;
- ascent = other.ascent;
- width = other.width;
- flags = other.flags;
- justified = other.justified;
- underlineStyle = other.underlineStyle;
- charFormat = other.charFormat;
- num_chars = other.num_chars;
- chars = other.chars;
- fontEngine = other.fontEngine;
- f = other.f;
- glyphs = other.glyphs;
- logClusters = other.logClusters;
-
- return *this;
-}
-
-void QTextItemInt::init(const QScriptItem &si, QFont *font, const QTextCharFormat &format)
-{
// explicitly initialize flags so that initFontAttributes can be called
// multiple times on the same TextItem
flags = 0;
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index 347b71e..f36cbd2 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -262,8 +262,6 @@ struct QGlyphLayout
}
void grow(char *address, int totalGlyphs);
-
- QGlyphLayout clone(char *address) const;
};
class QVarLengthGlyphLayoutArray : private QVarLengthArray<void *>, public QGlyphLayout
@@ -312,19 +310,12 @@ public:
: justified(false), underlineStyle(QTextCharFormat::NoUnderline), num_chars(0), chars(0),
logClusters(0), f(0), fontEngine(0)
{}
-
- QTextItemInt(const QTextItemInt &other);
QTextItemInt(const QScriptItem &si, QFont *font, const QTextCharFormat &format = QTextCharFormat());
- void init(const QScriptItem &si, QFont *font, const QTextCharFormat &format = QTextCharFormat());
-
- QTextItemInt clone(char *glyphLayoutMemory, unsigned short *logClusterMemory) const;
/// copy the structure items, adjusting the glyphs arrays to the right subarrays.
/// the width of the returned QTextItemInt is not adjusted, for speed reasons
QTextItemInt midItem(QFontEngine *fontEngine, int firstGlyphIndex, int numGlyphs) const;
- QTextItemInt &operator=(const QTextItemInt &other);
-
QFixed descent;
QFixed ascent;
QFixed width;
@@ -332,7 +323,7 @@ public:
RenderFlags flags;
bool justified;
QTextCharFormat::UnderlineStyle underlineStyle;
- QTextCharFormat charFormat;
+ const QTextCharFormat charFormat;
int num_chars;
const QChar *chars;
const unsigned short *logClusters;