Commit c6effc84 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

IdealController: no need to cast mainwindow from parent, available as member

GIT_SILENT
parent 1c74f857
......@@ -128,7 +128,7 @@ void IdealController::addView(Qt::DockWidgetArea area, View* view)
dock->setFocusProxy(dock->widget());
if (IdealButtonBarWidget* bar = barForDockArea(area)) {
QAction* action = bar->addWidget(dock, static_cast<MainWindow*>(parent())->area(), view);
QAction* action = bar->addWidget(dock, m_mainWindow->area(), view);
m_dockwidget_to_action[dock] = m_view_to_action[view] = action;
m_docks->addAction(action);
......@@ -177,7 +177,7 @@ void IdealController::dockLocationChanged(Qt::DockWidgetArea area)
docks.insert(dock);
if (IdealButtonBarWidget* bar = barForDockArea(area)) {
QAction* action = bar->addWidget(dock, static_cast<MainWindow*>(parent())->area(), view);
QAction* action = bar->addWidget(dock, m_mainWindow->area(), view);
m_dockwidget_to_action[dock] = m_view_to_action[view] = action;
// at this point the dockwidget is visible (user dragged it)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment