diff options
| author | Paul Wicking <paul.wicking@qt.io> | 2019-02-01 13:33:25 +0100 |
|---|---|---|
| committer | Paul Wicking <paul.wicking@qt.io> | 2019-02-01 13:33:26 +0100 |
| commit | 2bc362c9fa37455afbeb56e5f1852188ede3eab4 (patch) | |
| tree | b89e3c2c082a0285e8cd91733ddbc772fe4362a5 /src/gui/text/qtextengine.cpp | |
| parent | 5de981d3bc3df874f9df35a6899345f4f61fa951 (diff) | |
| parent | 481db443d502c8ebc169b7256cb696428cf02199 (diff) | |
Merge dev into 5.13
Change-Id: I8113c6d8735a151bd152e6096f8c8b8e63a05474
Diffstat (limited to 'src/gui/text/qtextengine.cpp')
| -rw-r--r-- | src/gui/text/qtextengine.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index bdb5592e9e9..506df0664d0 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); } |
