diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-01-28 01:00:39 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-01-28 14:17:01 +0000 |
commit | ef442327b8a4122fe46462e95a0537ec5ac53cb6 (patch) | |
tree | c0a0267ab4175d520a27c1dc7b589af220e77c48 /src/widgets/kernel/qapplication.cpp | |
parent | 07a576cc6171fd78d7fb3a0332349c2fa6127460 (diff) | |
parent | 558fc903acc610769279da2737ad679aa9fd728d (diff) | |
download | qtbase-ef442327b8a4122fe46462e95a0537ec5ac53cb6.tar.gz |
Merge "Merge remote-tracking branch 'origin/5.15' into dev"
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index eea97b2c0b..68f6b72d20 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1224,6 +1224,7 @@ void QApplication::setColorSpec(int spec) \property QApplication::globalStrut \brief the minimum size that any GUI element that the user can interact with should have + \deprecated For example, no button should be resized to be smaller than the global strut size. The strut size should be considered when reimplementing GUI @@ -3761,7 +3762,9 @@ void QApplicationPrivate::closePopup(QWidget *popup) if (QWidget *fw = aw->focusWidget()) fw->setFocus(Qt::PopupFocusReason); - if (QApplicationPrivate::popupWidgets->count() == 1) // grab mouse/keyboard + // can become nullptr due to setFocus() above + if (QApplicationPrivate::popupWidgets && + QApplicationPrivate::popupWidgets->count() == 1) // grab mouse/keyboard grabForPopup(aw); } |