summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qapplication.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-13 00:01:24 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-08-17 15:08:39 +0200
commit90436e54cc32e3fd32f7298c65ac236eaff01bba (patch)
treef512caf8650d6bb43425208c0291c7e8f1c1c63b /src/widgets/kernel/qapplication.cpp
parentc54a5b83804c00474d141b485b752a7c54169ebf (diff)
Move QDesktopWidget API used by QApplication into QDesktopWidget
QDesktopWidget is not a public class anymore and only exists for compatibility reasons. So we might just as well move the only method used by other classes out of QDesktopWidgetPrivate, and get rid of the friend declarations and the access-to-private code in QApplication. Change-Id: I74ff14233e59912e0930f98995f8af60dbadfdb6 Task-number: QTBUG-62094 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.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index f19a9d2e8e..3fe3c6951f 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -2556,8 +2556,7 @@ QWidget *QApplication::desktop(QScreen *screen)
}
if (!screen)
return qt_desktopWidget;
- QDesktopWidgetPrivate *dwp = static_cast<QDesktopWidgetPrivate*>(qt_widget_private(qt_desktopWidget));
- return dwp->widgetForScreen(screen);
+ return qt_desktopWidget->widgetForScreen(screen);
}
/*