diff options
author | Liang Qi <liang.qi@qt.io> | 2019-10-10 09:13:49 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-10-10 09:13:49 +0200 |
commit | 9c84b7786cac7ea1cf1a8a61b503fca4b5553a49 (patch) | |
tree | af018122dac633ad74f8e62bf260d1fb8339982a /src/widgets | |
parent | 18aa8390ce83b4aa9cabe5609b8f830f86e475e5 (diff) | |
parent | 63a3b26b6b2dae88a44ad6a4917563b5331823d6 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
src/plugins/platforms/xcb/qxcbscreen.h
src/src.pro
Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qopenglwidget.cpp | 8 | ||||
-rw-r--r-- | src/widgets/widgets/qtextedit.cpp | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp index 451b18d8d3..bc5ca21b97 100644 --- a/src/widgets/kernel/qopenglwidget.cpp +++ b/src/widgets/kernel/qopenglwidget.cpp @@ -788,10 +788,12 @@ void QOpenGLWidgetPrivate::initialize() if (initialized) return; - // Get our toplevel's context with which we will share in order to make the - // texture usable by the underlying window's backingstore. + // If no global shared context get our toplevel's context with which we + // will share in order to make the texture usable by the underlying window's backingstore. QWidget *tlw = q->window(); - QOpenGLContext *shareContext = get(tlw)->shareContext(); + QOpenGLContext *shareContext = qt_gl_global_share_context(); + if (!shareContext) + shareContext = get(tlw)->shareContext(); // If shareContext is null, showing content on-screen will not work. // However, offscreen rendering and grabFramebuffer() will stay fully functional. diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp index 0ccbad7eaa..0702603648 100644 --- a/src/widgets/widgets/qtextedit.cpp +++ b/src/widgets/widgets/qtextedit.cpp @@ -772,6 +772,7 @@ void QTextEdit::setAlignment(Qt::Alignment a) QTextCursor cursor = d->control->textCursor(); cursor.mergeBlockFormat(fmt); d->control->setTextCursor(cursor); + d->relayoutDocument(); } /*! |