diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-08-13 15:19:20 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-08-18 13:10:23 +0000 |
commit | 23697466cae8f1a49537fed1e60db8cea79207b4 (patch) | |
tree | de527385caf854ddd810b39369370c8730c5306e /src/widgets/util/qcompleter.cpp | |
parent | 52ad5afe1c1d8f8d47fccbdf474f8c6119b94608 (diff) |
Reduce usage of QDesktopWidget to resolve screen properties in QtWidgets
Removes the need to initialize QDesktopWidget, just to look up which
screen a widget would map to, the geometry of a screen, number of
screens, etc.
Change-Id: Ieb153b9ff6d3fba645fc528d6e430e8392f990bf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/util/qcompleter.cpp')
-rw-r--r-- | src/widgets/util/qcompleter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/util/qcompleter.cpp b/src/widgets/util/qcompleter.cpp index 3a1821240e..8b5aa3f2e4 100644 --- a/src/widgets/util/qcompleter.cpp +++ b/src/widgets/util/qcompleter.cpp @@ -160,6 +160,7 @@ #include "QtWidgets/qapplication.h" #include "QtGui/qevent.h" #include "QtWidgets/qdesktopwidget.h" +#include <private/qdesktopwidget_p.h> #include "QtWidgets/qlineedit.h" QT_BEGIN_NAMESPACE @@ -922,7 +923,7 @@ void QCompleterPrivate::_q_autoResizePopup() void QCompleterPrivate::showPopup(const QRect& rect) { - const QRect screen = QApplication::desktop()->availableGeometry(widget); + const QRect screen = QDesktopWidgetPrivate::availableGeometry(widget); Qt::LayoutDirection dir = widget->layoutDirection(); QPoint pos; int rh, w; |