diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-16 07:37:38 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-16 12:35:36 +0100 |
commit | 90c425642dfeae4564b43dacf15f80479962e910 (patch) | |
tree | 7e51683195210b3c70c04a8a0753ee272af1cd4c /src/gui/text | |
parent | 1a43199fcea1bcec1ebf1a1a12cd3dcb942d67b4 (diff) | |
parent | 9808b53fde1dfc65ad3757cc6720e430c3cc89a2 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
mkspecs/common/linux-android.conf
src/gui/opengl/qopengl.h
src/network/socket/qnativesocketengine_winrt.cpp
src/network/socket/qnativesocketengine_winrt_p.h
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
sync.profile
Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 07aec6f019..0d05fee6ef 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1766,6 +1766,10 @@ QTextBlock QTextDocument::lastBlock() const \property QTextDocument::pageSize \brief the page size that should be used for laying out the document + The units are determined by the underlying paint device. The size is + measured in logical pixels when painting to the screen, and in points + (1/72 inch) when painting to a printer. + By default, for a newly-created, empty document, this property contains an undefined size. diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 28a5eb6a89..540bbf5d54 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1905,11 +1905,15 @@ void QTextLine::layout_helper(int maxGlyphs) ++lbh.glyphCount; if (lbh.checkFullOtherwiseExtend(line)) goto found; - } else if (attributes[lbh.currentPosition].whiteSpace) { + } else if (attributes[lbh.currentPosition].whiteSpace + && eng->layoutData->string.at(lbh.currentPosition).decompositionTag() != QChar::NoBreak) { lbh.whiteSpaceOrObject = true; - while (lbh.currentPosition < end && attributes[lbh.currentPosition].whiteSpace) + while (lbh.currentPosition < end + && attributes[lbh.currentPosition].whiteSpace + && eng->layoutData->string.at(lbh.currentPosition).decompositionTag() != QChar::NoBreak) { addNextCluster(lbh.currentPosition, end, lbh.spaceData, lbh.glyphCount, current, lbh.logClusters, lbh.glyphs); + } if (!lbh.manualWrap && lbh.spaceData.textWidth > line.width) { lbh.spaceData.textWidth = line.width; // ignore spaces that fall out of the line. |