summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-29 01:00:22 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-29 01:00:22 +0200
commit4a54e8fd821651079a53f4adc831efd6b1ba9bc7 (patch)
tree32dfcf43aa554a9e235a37a831e366b68bcaafa3 /src/gui
parente092b32922ef650d49167aaf48f9d33190191f9f (diff)
parent9f1a1e320c118ec84d389aaf83008bf01521ce6f (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/configure.json2
-rw-r--r--src/gui/configure.pri11
-rw-r--r--src/gui/opengl/qopengldebug.cpp2
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp5
4 files changed, 6 insertions, 14 deletions
diff --git a/src/gui/configure.json b/src/gui/configure.json
index a4ea4375d1..d7c0da4640 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -445,7 +445,7 @@
],
"sources": [
{ "type": "pkgConfig", "args": "gl", "condition": "!config.darwin" },
- { "type": "openglMakeSpec" }
+ { "type": "makeSpec", "spec": "OPENGL" }
]
},
"opengl_es2": {
diff --git a/src/gui/configure.pri b/src/gui/configure.pri
index 0db106597e..1b95449a10 100644
--- a/src/gui/configure.pri
+++ b/src/gui/configure.pri
@@ -15,17 +15,6 @@ defineTest(qtConfLibrary_freetype) {
return(true)
}
-defineTest(qtConfLibrary_openglMakeSpec) {
- darwin:sdk {
- sysrootified =
- for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
- QMAKE_INCDIR_OPENGL = $$sysrootified
- }
- $${1}.spec = OPENGL
- !qtConfLibrary_makeSpec($$1, $$2): return(false)
- return(true)
-}
-
# Check for Direct X shader compiler 'fxc'.
# Up to Direct X SDK June 2010 and for MinGW, this is pointed to by the
# DXSDK_DIR variable. Starting with Windows Kit 8, it is included in
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index 2e628a2bd5..9f1bb76869 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -1366,7 +1366,7 @@ bool QOpenGLDebugLogger::initialize()
#define GET_DEBUG_PROC_ADDRESS(procName) \
d->procName = reinterpret_cast< qt_ ## procName ## _t >( \
- d->context->getProcAddress(#procName) \
+ d->context->getProcAddress(d->context->isOpenGLES() ? (#procName "KHR") : (#procName)) \
);
GET_DEBUG_PROC_ADDRESS(glDebugMessageControl);
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 2e1a2b5bff..bed0a2c450 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -145,6 +145,9 @@ struct QTextLayoutStruct {
inline QFixed absoluteY() const
{ return frameY + y; }
+ inline QFixed contentHeight() const
+ { return pageHeight - pageBottomMargin - pageTopMargin; }
+
inline int currentPage() const
{ return pageHeight == 0 ? 0 : (absoluteY() / pageHeight).truncate(); }
@@ -2701,7 +2704,7 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
getLineHeightParams(blockFormat, line, scaling, &lineAdjustment, &lineBreakHeight, &lineHeight, &lineBottom);
while (layoutStruct->pageHeight > 0 && layoutStruct->absoluteY() + lineBreakHeight > layoutStruct->pageBottom &&
- layoutStruct->pageHeight >= lineBreakHeight) {
+ layoutStruct->contentHeight() >= lineBreakHeight) {
layoutStruct->newPage();
floatMargins(layoutStruct->y, layoutStruct, &left, &right);