From b8ebadbecdc740ba449492e5808a778ad7b3456c Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Mon, 13 Jul 2020 14:58:51 +0200 Subject: [PATCH] Remove wrapper APIs from QDesktopWidgetPrivate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I99e7d82a9e369fee23bcc565553ad9783fa862f9 Reviewed-by: Tor Arne Vestbø --- src/widgets/kernel/qdesktopwidget_p.h | 45 --------------------------- 1 file changed, 45 deletions(-) diff --git a/src/widgets/kernel/qdesktopwidget_p.h b/src/widgets/kernel/qdesktopwidget_p.h index d2845af17c..f0664794bc 100644 --- a/src/widgets/kernel/qdesktopwidget_p.h +++ b/src/widgets/kernel/qdesktopwidget_p.h @@ -96,51 +96,6 @@ public: return screenWidgets.value(qScreen); } - static inline int screenNumber(const QWidget *widget = nullptr) - { - if (!widget) - return 0; - return QGuiApplication::screens().indexOf(widget->screen()); - } - - static inline int screenNumber(const QPoint &point) - { - int screenNo = 0; - if (QScreen *screen = QGuiApplication::screenAt(point)) - screenNo = QGuiApplication::screens().indexOf(screen); - return screenNo; - } - - static inline QScreen *screen(int screenNo = -1) - { - const QList screens = QGuiApplication::screens(); - if (screenNo == -1) - screenNo = 0; - if (screenNo < 0 || screenNo >= screens.size()) - return nullptr; - return screens.at(screenNo); - } - - static inline QRect screenGeometry(int screenNo = -1) - { - QRect rect; - if (const QScreen *s = screen(screenNo)) - rect = s->geometry(); - return rect; - } - static inline QRect screenGeometry(const QPoint &point) - { return screenGeometry(screenNumber(point)); } - - static inline QRect availableGeometry(int screenNo = -1) - { - QRect rect; - if (const QScreen *s = screen(screenNo)) - rect = s->availableGeometry(); - return rect; - } - static inline QRect availableGeometry(const QPoint &point) - { return availableGeometry(screenNumber(point)); } - QFlatMap screenWidgets; };