summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-01-26 08:35:40 +0100
committerLiang Qi <liang.qi@qt.io>2019-01-26 08:35:40 +0100
commit980567b3a32b2e2f00c86f2d627cd82b5230dd0f (patch)
treebc8cc4005b2e07cbc5cad8ba30f8c9fa4f236c3d /src/gui/text
parente81acde7d0cf5fb44a3fb2cf0bf7aaa2c65f807e (diff)
parent730cbad8824bcfcb7ab60371a6563cfb6dd5658d (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: src/android/templates/AndroidManifest.xml tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextengine.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index bdb5592e9e..506df0664d 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1972,14 +1972,18 @@ void QTextEngine::shape(int item) const
}
// fix log clusters to point to the previous glyph, as the object doesn't have a glyph of it's own.
// This is required so that all entries in the array get initialized and are ordered correctly.
- ushort *lc = logClusters(&li);
- *lc = item ? lc[-1] : 0;
+ if (layoutData->logClustersPtr) {
+ ushort *lc = logClusters(&li);
+ *lc = (lc != layoutData->logClustersPtr) ? lc[-1] : 0;
+ }
} else if (li.analysis.flags == QScriptAnalysis::Tab) {
// set up at least the ascent/descent/leading of the script item for the tab
fontEngine(li, &li.ascent, &li.descent, &li.leading);
// see the comment above
- ushort *lc = logClusters(&li);
- *lc = item ? lc[-1] : 0;
+ if (layoutData->logClustersPtr) {
+ ushort *lc = logClusters(&li);
+ *lc = (lc != layoutData->logClustersPtr) ? lc[-1] : 0;
+ }
} else {
shapeText(item);
}