summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-13 21:02:39 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-10-14 18:10:16 +0200
commita8dd18252c4c8027e8c7956f3c5428b56014445b (patch)
tree8fb5b1e62c4158b56117df0ba3e688e4031e2fd1 /src/widgets/kernel/qapplication.cpp
parent5c097f895d73a80c8ff5b401100e25c4b5f69eeb (diff)
Remove QApplication::desktop
It's been replaced with QScreen-based APIs. There's some internal code left depending on a QWidget representing a screen, so move the API into QApplicationPrivate until that's cleaned up as well. Change-Id: I851e0901832f2747af3bf2c16a9c4d815598bd08 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r--src/widgets/kernel/qapplication.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index bb43812619..be37182ccd 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -1567,7 +1567,7 @@ QWidget *QApplication::activeWindow()
QFontMetrics QApplication::fontMetrics()
{
- return desktop()->fontMetrics();
+ return QApplicationPrivate::desktop()->fontMetrics();
}
bool QApplicationPrivate::tryCloseAllWidgetWindows(QWindowList *processedWindows)
@@ -2107,7 +2107,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave, con
if (!parentOfLeavingCursor->window()->graphicsProxyWidget())
#endif
{
- if (enter == QApplication::desktop()) {
+ if (enter == QApplicationPrivate::desktop()) {
qt_qpa_set_cursor(enter, true);
} else {
qt_qpa_set_cursor(parentOfLeavingCursor, true);
@@ -2522,7 +2522,7 @@ void QApplicationPrivate::sendSyntheticEnterLeave(QWidget *widget)
Use QScreen::geometry() and QScreen::availableGeometry() to get the dimensions
of a specific screen instead.
*/
-QWidget *QApplication::desktop(QScreen *screen)
+QWidget *QApplicationPrivate::desktop(QScreen *screen)
{
CHECK_QAPP_INSTANCE(nullptr)
if (!qt_desktopWidget || // not created yet