diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index fec367e9dd5..10489f830b4 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -1287,13 +1287,6 @@ bool QMainWindow::event(QEvent *event) return true; #endif // QT_CONFIG(statustip) -#if QT_CONFIG(dockwidget) - case QEvent::Show: - Q_ASSERT(d->layout); - d->layout->showDockWidgets(); - break; -#endif // QT_CONFIG(dockwidget) - case QEvent::StyleChange: #if QT_CONFIG(dockwidget) Q_ASSERT(d->layout); diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp index 9f7bc68357e..3dd06398d32 100644 --- a/src/widgets/widgets/qmainwindowlayout.cpp +++ b/src/widgets/widgets/qmainwindowlayout.cpp @@ -1626,17 +1626,6 @@ inline static Qt::DockWidgetArea toDockWidgetArea(int pos) return QDockWidgetPrivate::toDockWidgetArea(static_cast(pos)); } -void QMainWindowLayout::showDockWidgets() const -{ - const auto dockWidgets = parent()->findChildren(Qt::FindDirectChildrenOnly); - for (auto *dockWidget : dockWidgets) - dockWidget->show(); - - const auto groupWindows = parent()->findChildren(Qt::FindDirectChildrenOnly); - for (auto *groupWindow : groupWindows) - groupWindow->show(); -} - // Checks if QDockWidgetGroupWindow or QDockWidget can be plugged the area indicated by path. // Returns false if called with invalid widget type or if compiled without dockwidget support. static bool isAreaAllowed(QWidget *widget, const QList &path) diff --git a/src/widgets/widgets/qmainwindowlayout_p.h b/src/widgets/widgets/qmainwindowlayout_p.h index c8f500a0db3..1f18addebbe 100644 --- a/src/widgets/widgets/qmainwindowlayout_p.h +++ b/src/widgets/widgets/qmainwindowlayout_p.h @@ -498,7 +498,6 @@ class Q_AUTOTEST_EXPORT QMainWindowLayout Qt::Orientation orientation); Qt::DockWidgetArea dockWidgetArea(QWidget* widget) const; bool restoreDockWidget(QDockWidget *dockwidget); - void showDockWidgets() const; #if QT_CONFIG(tabbar) void tabifyDockWidget(QDockWidget *first, QDockWidget *second); void raise(QDockWidget *widget);