summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-06-07 13:12:57 +0200
committerLiang Qi <liang.qi@qt.io>2019-06-07 13:19:27 +0200
commit9967a011eaae8988b10e56fde0f2ab8b6bab90ac (patch)
tree353b932414a8d9d94a418e84068550b0a2376b37 /src/gui/kernel
parent91ab70d17f892f3ff6b2019632fda3920d045dcb (diff)
parent99636127d10f96d8313bc26030cabf9841381914 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: qmake/generators/makefile.cpp src/plugins/platforms/cocoa/qcocoaintegration.h src/plugins/platforms/cocoa/qcocoaintegration.mm Done-With: Jörg Bornemann <joerg.bornemann@qt.io> Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qpalette.cpp5
-rw-r--r--src/gui/kernel/qwindow.cpp6
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index b4383c5bfc..193fd9590d 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 0f62fb375b..ed516c0eed 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)