summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qwizard.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-07-06 17:22:12 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-07-07 11:49:32 +0200
commit7e2fded55e67727043c3dd0a1a5b3883655101c4 (patch)
treee7ba2ab69ebe9077be9614f574f7f2dc1d375a79 /src/widgets/dialogs/qwizard.cpp
parentbcbc4d4de2d4d27f70fc56baf104d93b31d57061 (diff)
Remove usage of QDesktopWidget(Private) from most places in QtWidgets
Call QGuiApplication and QScreen APIs directly to get geometries, and make use of QScreen::grabWindow grabbing the screen it's called on when called with WId == 0. This assumes that QGuiApplication::screen and QWidget::screen never return nullptr, which is already assumed in other places. In QSplashScreen, simplify the code to operate on the screen of the QSplashScreen itself. Remove the case that handles a QDesktopWidget parent - QSplashScreen doesn't have a constructor that takes a QWidget* parent anymore. In the QEffect implementation, we can rely on the widget pointer not being nullptr (it's tested in the free functions client code uses). Includes a few drive-by changes to coding style and logic in qtooltip.cpp, where the tip label placement now prefers the screen of the widget the label is created for, and uses the position only as a fallback. What remains is the special handling of QDesktopWidget and the Qt::Desktop type in QWidget and QApplication. Change-Id: I30b67bab8ae82ddfcc7bbbec3c10f6e935b74f06 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qwizard.cpp')
-rw-r--r--src/widgets/dialogs/qwizard.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 0860f9defe..2548a668ce 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -47,7 +47,6 @@
#include "qapplication.h"
#include "qboxlayout.h"
#include "qlayoutitem.h"
-#include <private/qdesktopwidget_p.h>
#include "qevent.h"
#include "qframe.h"
#include "qlabel.h"