diff options
author | Liang Qi <liang.qi@qt.io> | 2019-06-14 11:56:56 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-06-14 13:45:18 +0200 |
commit | b1a216649ec064412160638dd00195cd47c567aa (patch) | |
tree | a4134415a3849cfb857942e698514be9da18924f /src/gui/kernel | |
parent | 2e20ae3c1b57169497f6f3904623be4f5e617e12 (diff) | |
parent | 1632786f00875d23c7d111cbb29dedaa35c1c8c2 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
qmake/generators/makefile.cpp
qmake/generators/unix/unixmake2.cpp
src/corelib/thread/qthread_unix.cpp
tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp
Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qevent.cpp | 14 | ||||
-rw-r--r-- | src/gui/kernel/qopenglwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qpalette.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 6 |
4 files changed, 19 insertions, 8 deletions
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 2f3a02f4d6..f327c2d43e 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -97,35 +97,35 @@ QEnterEvent::~QEnterEvent() /*! \fn QPoint QEnterEvent::globalPos() const - Returns the global position of the widget \e{at the time of the event}. + Returns the global position of the mouse cursor \e{at the time of the event}. */ /*! \fn int QEnterEvent::globalX() const - Returns the global position on the X-axis of the mouse cursor relative to the the widget. + Returns the global position on the X-axis of the mouse cursor \e{at the time of the event}. */ /*! \fn int QEnterEvent::globalY() const - Returns the global position on the Y-axis of the mouse cursor relative to the the widget. + Returns the global position on the Y-axis of the mouse cursor \e{at the time of the event}. */ /*! - \fn QPoint QEnterEvent::localPos() const + \fn QPointF QEnterEvent::localPos() const Returns the mouse cursor's position relative to the receiving widget. */ /*! \fn QPoint QEnterEvent::pos() const - Returns the position of the mouse cursor in global screen coordinates. + Returns the position of the mouse cursor relative to the receiving widget. */ /*! - \fn QPoint QEnterEvent::screenPos() const + \fn QPointF QEnterEvent::screenPos() const Returns the position of the mouse cursor relative to the receiving screen. */ /*! - \fn QPoint QEnterEvent::windowPos() const + \fn QPointF QEnterEvent::windowPos() const Returns the position of the mouse cursor relative to the receiving window. */ diff --git a/src/gui/kernel/qopenglwindow.cpp b/src/gui/kernel/qopenglwindow.cpp index 8b052d92ae..022a47c919 100644 --- a/src/gui/kernel/qopenglwindow.cpp +++ b/src/gui/kernel/qopenglwindow.cpp @@ -440,7 +440,7 @@ void QOpenGLWindow::makeCurrent() d->context->makeCurrent(this); } else { if (!d->offscreenSurface) { - d->offscreenSurface.reset(new QOffscreenSurface); + d->offscreenSurface.reset(new QOffscreenSurface(screen())); d->offscreenSurface->setFormat(d->context->format()); d->offscreenSurface->create(); } diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp index f6e5fa0a52..90471e15e1 100644 --- a/src/gui/kernel/qpalette.cpp +++ b/src/gui/kernel/qpalette.cpp @@ -1008,6 +1008,8 @@ QDataStream &operator<<(QDataStream &s, const QPalette &p) max = QPalette::HighlightedText + 1; else if (s.version() <= QDataStream::Qt_4_3) max = QPalette::AlternateBase + 1; + else if (s.version() <= QDataStream::Qt_5_11) + max = QPalette::ToolTipText + 1; for (int r = 0; r < max; r++) s << p.d->br[grp][r]; } @@ -1048,6 +1050,9 @@ QDataStream &operator>>(QDataStream &s, QPalette &p) } else if (s.version() <= QDataStream::Qt_4_3) { p = QPalette(); max = QPalette::AlternateBase + 1; + } else if (s.version() <= QDataStream::Qt_5_11) { + p = QPalette(); + max = QPalette::ToolTipText + 1; } QBrush tmp; diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index aad5f856be..b71a0c54aa 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -218,6 +218,12 @@ QWindow::~QWindow() QGuiApplicationPrivate::window_list.removeAll(this); if (!QGuiApplicationPrivate::is_app_closing) QGuiApplicationPrivate::instance()->modalWindowList.removeOne(this); + + // focus_window is normally cleared in destroy(), but the window may in + // some cases end up becoming the focus window again. Clear it again + // here as a workaround. See QTBUG-75326. + if (QGuiApplicationPrivate::focus_window == this) + QGuiApplicationPrivate::focus_window = 0; } void QWindowPrivate::init(QScreen *targetScreen) |