44fb925f50
Remove QDestopWidget public header, simplify the implementation that maintains a Qt::Desktop type QWidget for each QScreen, and turn QWidget's initial target screen into a QScreen pointer. QApplication::desktop() now takes an optional QScreen pointer, and returns a QWidget pointer, so that applications and widgets can get access to the root widget for a specific screen without having to resort to private APIs. QDesktopWidgetPrivate implementations to look up a screen for an index, widget, or point are now all inline functions that thinly wrap QGuiApplication::screens/screenAt calls. We should consider adding those as convenience APIs to QScreen instead. Note that QWidget::screen is assumed to return a valid pointer; there is code that handles the case that it returns nullptr (but also code that trusts that it never is nullptr), so this needs to be defined, verified with tests, and asserted. We can then simplify the code further. Change-Id: Ifc89be65a0dce265b6729feaf54121c35137cb94 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> |
||
---|---|---|
.. | ||
android | ||
compiler | ||
gestures | ||
lancelot | ||
languagechange | ||
macgui | ||
macnativeevents | ||
macplist | ||
networkselftest | ||
qabstractitemmodelutils | ||
qaccessibility | ||
qaccessibilitylinux | ||
qaccessibilitymac | ||
qcomplextext | ||
qfocusevent | ||
qnetworkaccessmanager_and_qprogressdialog | ||
qobjectrace | ||
qprocess_and_guieventloop | ||
qsharedpointer_and_qwidget | ||
qtokenautomaton | ||
qvariant_common | ||
sessionmanagement_macos | ||
toolsupport | ||
xkbkeyboard | ||
.prev_CMakeLists.txt | ||
CMakeLists.txt | ||
other.pro |