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>
This commit is contained in:
parent
5c097f895d
commit
a8dd18252c
@ -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
|
||||
|
@ -105,8 +105,6 @@ public:
|
||||
static QWidgetList allWidgets();
|
||||
static QWidgetList topLevelWidgets();
|
||||
|
||||
static QWidget *desktop(QScreen *screen = nullptr);
|
||||
|
||||
static QWidget *activePopupWidget();
|
||||
static QWidget *activeModalWidget();
|
||||
static QWidget *focusWidget();
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
|
||||
void createEventDispatcher() override;
|
||||
static void dispatchEnterLeave(QWidget *enter, QWidget *leave, const QPointF &globalPosF);
|
||||
|
||||
static QWidget *desktop(QScreen *screen = nullptr);
|
||||
void notifyWindowIconChanged() override;
|
||||
|
||||
#ifndef QT_NO_ACTION
|
||||
|
Loading…
Reference in New Issue
Block a user