summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-04 16:06:34 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-04 16:06:34 (GMT)
commitc1bbcda2cdd70d2a7a615bf823c55520914b90f5 (patch)
tree518e4083d98579d29a09a751370eb78cfa02857f /src
parent0429ed6c8a5f679444ca87bdcbdfb0093d7699a3 (diff)
parent9fdee69ef3d08f37a2a4f5daceb4606aa5c7ae9b (diff)
downloadQt-c1bbcda2cdd70d2a7a615bf823c55520914b90f5.zip
Qt-c1bbcda2cdd70d2a7a615bf823c55520914b90f5.tar.gz
Qt-c1bbcda2cdd70d2a7a615bf823c55520914b90f5.tar.bz2
Merge branch 4.7 into qt-4.8-from-4.7
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp1
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
index c202e1f..3410782 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp
@@ -655,6 +655,7 @@ void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength,
const HB_ScriptItem *items, hb_uint32 numItems,
HB_CharAttributes *attributes)
{
+ memset(attributes, 0, stringLength * sizeof(HB_CharAttributes));
calcLineBreaks(string, stringLength, attributes);
for (hb_uint32 i = 0; i < numItems; ++i) {
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index 34bc406..47319d4 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -199,11 +199,11 @@ QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &o
chars = other.chars;
length = other.length;
pos = other.pos;
- freePrivate = true;
QTextBoundaryFinderPrivate *newD = (QTextBoundaryFinderPrivate *)
- realloc(d, length*sizeof(HB_CharAttributes));
+ realloc(freePrivate ? d : 0, length*sizeof(HB_CharAttributes));
Q_CHECK_PTR(newD);
+ freePrivate = true;
d = newD;
memcpy(d, other.d, length*sizeof(HB_CharAttributes));