diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-23 10:13:28 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-23 10:13:29 +0100 |
commit | e3da05f39a5b000bbb6194396d688bf26af771fd (patch) | |
tree | 6b1e0b84a2ef9b7abdd465c0aecb5688fcb40f1a /src/gui/text | |
parent | 0c007a87be88f44151616b7251cfed5508913e0f (diff) | |
parent | 9822d57d858068cfe5a07281ef069ef8c4c7b7b3 (diff) |
Merge remote-tracking branch 'origin/5.12.1' into 5.12
Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
Diffstat (limited to 'src/gui/text')
-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 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); } |