summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qcombobox.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-04-11 07:47:21 +0200
committerLiang Qi <liang.qi@qt.io>2019-04-11 07:47:21 +0200
commitc7af193d2e49e9f10b86262e63d8d13abf72b5cf (patch)
tree7ca5d4ba83888bb5ad4d9b0141e5c62f8a5138f2 /src/widgets/widgets/qcombobox.cpp
parent235ac95520a0fc2c822dedce7358e3c64a764255 (diff)
parent63e88f60a769f2535945db0e1cabb9815ff45a77 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/widgets/styles/qstyle_p.h Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
Diffstat (limited to 'src/widgets/widgets/qcombobox.cpp')
-rw-r--r--src/widgets/widgets/qcombobox.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp
index 932affde07..17090efb56 100644
--- a/src/widgets/widgets/qcombobox.cpp
+++ b/src/widgets/widgets/qcombobox.cpp
@@ -80,6 +80,7 @@
#if QT_CONFIG(effects)
# include <private/qeffects_p.h>
#endif
+#include <private/qstyle_p.h>
#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
#endif
@@ -261,16 +262,11 @@ void QComboBoxPrivate::_q_modelDestroyed()
model = QAbstractItemModelPrivate::staticEmptyModel();
}
-
-//Windows and KDE allows menus to cover the taskbar, while GNOME and Mac don't
QRect QComboBoxPrivate::popupGeometry(int screen) const
{
- bool useFullScreenForPopupMenu = false;
- if (const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme())
- useFullScreenForPopupMenu = theme->themeHint(QPlatformTheme::UseFullScreenForPopupMenu).toBool();
- return useFullScreenForPopupMenu ?
- QDesktopWidgetPrivate::screenGeometry(screen) :
- QDesktopWidgetPrivate::availableGeometry(screen);
+ return QStylePrivate::useFullScreenForPopup()
+ ? QDesktopWidgetPrivate::screenGeometry(screen)
+ : QDesktopWidgetPrivate::availableGeometry(screen);
}
bool QComboBoxPrivate::updateHoverControl(const QPoint &pos)