diff --git a/src/View.cpp b/src/View.cpp index 3cdca1b8..302eac65 100644 --- a/src/View.cpp +++ b/src/View.cpp @@ -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(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; diff --git a/src/View.h b/src/View.h index 201a8297..4a5f366f 100644 --- a/src/View.h +++ b/src/View.h @@ -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) const;