summaryrefslogtreecommitdiffstats
path: root/src/widgets/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/util')
-rw-r--r--src/widgets/util/qcompleter.cpp3
-rw-r--r--src/widgets/util/qsystemtrayicon.cpp5
2 files changed, 5 insertions, 3 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;
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp
index 19c22eca46..fb3782881c 100644
--- a/src/widgets/util/qsystemtrayicon.cpp
+++ b/src/widgets/util/qsystemtrayicon.cpp
@@ -59,6 +59,7 @@
#include "qgridlayout.h"
#include "qapplication.h"
#include "qdesktopwidget.h"
+#include <private/qdesktopwidget_p.h>
#include "qbitmap.h"
#include <private/qhighdpiscaling_p.h>
@@ -535,7 +536,7 @@ QBalloonTip::QBalloonTip(const QIcon &icon, const QString &title,
msgLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
// smart size for the message label
- int limit = QApplication::desktop()->availableGeometry(msgLabel).size().width() / 3;
+ int limit = QDesktopWidgetPrivate::availableGeometry(msgLabel).size().width() / 3;
if (msgLabel->sizeHint().width() > limit) {
msgLabel->setWordWrap(true);
if (msgLabel->sizeHint().width() > limit) {
@@ -602,7 +603,7 @@ void QBalloonTip::resizeEvent(QResizeEvent *ev)
void QBalloonTip::balloon(const QPoint& pos, int msecs, bool showArrow)
{
this->showArrow = showArrow;
- QRect scr = QApplication::desktop()->screenGeometry(pos);
+ QRect scr = QDesktopWidgetPrivate::screenGeometry(pos);
QSize sh = sizeHint();
const int border = 1;
const int ah = 18, ao = 18, aw = 18, rc = 7;