Add some missing const

This commit is contained in:
Sergio Martins
2022-05-01 23:58:14 +01:00
parent a550567a4c
commit e17f6c0066
2 changed files with 4 additions and 4 deletions

View File

@@ -250,7 +250,7 @@ Controllers::DropArea *View::asDropArea() const
return nullptr;
}
MDILayoutWidget *View::asMDILayoutView()
MDILayoutWidget *View::asMDILayoutView() const
{
if (!m_inDtor && m_controller && m_controller->is(Type::MDILayout))
return qobject_cast<MDILayoutWidget *>(m_controller);
@@ -258,7 +258,7 @@ MDILayoutWidget *View::asMDILayoutView()
return nullptr;
}
LayoutWidget *View::asLayoutWidget()
LayoutWidget *View::asLayoutWidget() const
{
if (Controllers::DropArea *da = asDropArea()) {
return da;

View File

@@ -241,8 +241,8 @@ public:
Controllers::DockWidget *asDockWidgetController() const;
Controllers::MainWindow *asMainWindowController() const;
Controllers::DropArea *asDropArea() const;
MDILayoutWidget *asMDILayoutView();
LayoutWidget *asLayoutWidget();
MDILayoutWidget *asMDILayoutView() const;
LayoutWidget *asLayoutWidget() const;
/// @brief returns whether this view is inside the specified window
bool isInWindow(std::shared_ptr<Window> window) const;