Skip to content

Commit

Permalink
Merge pull request qt#101 from autodesk-forks/adsk-contrib-maya-v6.5.…
Browse files Browse the repository at this point in the history
…3-kandass1/MAYA-133169/hidden_dock_widgets_shown

Revert "QDockWidget: Always show dock widgets with the main window"
  • Loading branch information
Senthil Kannan Kandaswamy authored and GitHub Enterprise committed Apr 3, 2024
2 parents db413ca + 93106d5 commit 43996d7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
7 changes: 0 additions & 7 deletions src/widgets/widgets/qmainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
11 changes: 0 additions & 11 deletions src/widgets/widgets/qmainwindowlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1626,17 +1626,6 @@ inline static Qt::DockWidgetArea toDockWidgetArea(int pos)
return QDockWidgetPrivate::toDockWidgetArea(static_cast<QInternal::DockPosition>(pos));
}

void QMainWindowLayout::showDockWidgets() const
{
const auto dockWidgets = parent()->findChildren<QDockWidget *>(Qt::FindDirectChildrenOnly);
for (auto *dockWidget : dockWidgets)
dockWidget->show();

const auto groupWindows = parent()->findChildren<QDockWidgetGroupWindow *>(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<int> &path)
Expand Down
1 change: 0 additions & 1 deletion src/widgets/widgets/qmainwindowlayout_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 43996d7

Please sign in to comment.