diff --git a/src/blackgui/components/dbautostashingcomponent.cpp b/src/blackgui/components/dbautostashingcomponent.cpp index c612bb5f5..d2c986a30 100644 --- a/src/blackgui/components/dbautostashingcomponent.cpp +++ b/src/blackgui/components/dbautostashingcomponent.cpp @@ -155,12 +155,7 @@ namespace BlackGui } } - const CAircraftModelView *CDbAutoStashingComponent::currentModelView() const - { - return this->getMappingComponent()->currentModelView(); - } - - CAircraftModelView *CDbAutoStashingComponent::currentModelView() + CAircraftModelView *CDbAutoStashingComponent::currentModelView() const { return this->getMappingComponent()->currentModelView(); } diff --git a/src/blackgui/components/dbautostashingcomponent.h b/src/blackgui/components/dbautostashingcomponent.h index 2cdee5956..6c205d18b 100644 --- a/src/blackgui/components/dbautostashingcomponent.h +++ b/src/blackgui/components/dbautostashingcomponent.h @@ -79,10 +79,7 @@ namespace BlackGui int getSelectedOrAllCount() const; //! Model view to take models from - const BlackGui::Views::CAircraftModelView *currentModelView() const; - - //! Model view to take models from - BlackGui::Views::CAircraftModelView *currentModelView(); + BlackGui::Views::CAircraftModelView *currentModelView() const; //! Add a status message void addStatusMessage(const BlackMisc::CStatusMessage &msg); diff --git a/src/blackgui/components/dbstashcomponent.cpp b/src/blackgui/components/dbstashcomponent.cpp index 6e3e40da1..d0f4814e4 100644 --- a/src/blackgui/components/dbstashcomponent.cpp +++ b/src/blackgui/components/dbstashcomponent.cpp @@ -125,12 +125,7 @@ namespace BlackGui return this->ui->tvp_StashAircraftModels->removeModelsWithModelString(modelStrings); } - const Views::CAircraftModelView *CDbStashComponent::getView() const - { - return ui->tvp_StashAircraftModels; - } - - Views::CAircraftModelView *CDbStashComponent::getView() + Views::CAircraftModelView *CDbStashComponent::getView() const { return ui->tvp_StashAircraftModels; } diff --git a/src/blackgui/components/dbstashcomponent.h b/src/blackgui/components/dbstashcomponent.h index 42251bb2e..b447b5d8b 100644 --- a/src/blackgui/components/dbstashcomponent.h +++ b/src/blackgui/components/dbstashcomponent.h @@ -15,7 +15,6 @@ #include "blackgui/components/enablefordockwidgetinfoarea.h" #include "blackgui/components/dbmappingcomponentaware.h" #include "blackgui/menudelegate.h" -#include "blackgui/views/aircraftmodelview.h" #include "blackmisc/verify.h" #include #include @@ -25,6 +24,7 @@ namespace Ui { class CDbStashComponent; } namespace BlackGui { + namespace Views { class CAircraftModelView; } namespace Components { /*! @@ -60,10 +60,7 @@ namespace BlackGui int unstashModels(QStringList modelStrings); //! The embedded view - const BlackGui::Views::CAircraftModelView *getView() const; - - //! The embedded view - Views::CAircraftModelView *getView(); + BlackGui::Views::CAircraftModelView *getView() const; //! Has stashed models bool hasStashedModels() const; diff --git a/src/blackgui/components/enablefordockwidgetinfoarea.cpp b/src/blackgui/components/enablefordockwidgetinfoarea.cpp index f15a2c525..0f69e7cca 100644 --- a/src/blackgui/components/enablefordockwidgetinfoarea.cpp +++ b/src/blackgui/components/enablefordockwidgetinfoarea.cpp @@ -31,7 +31,7 @@ namespace BlackGui { // we already have a value // changes should not happen - Q_ASSERT(this->m_parentDockableInfoArea == parentDockableWidget); + Q_ASSERT_X(this->m_parentDockableInfoArea == parentDockableWidget, Q_FUNC_INFO, "Reassigned parent dock widget area"); return this->m_parentDockableInfoArea == parentDockableWidget; } @@ -46,14 +46,7 @@ namespace BlackGui return true; } - const CInfoArea *CEnableForDockWidgetInfoArea::getParentInfoArea() const - { - Q_ASSERT(this->m_parentDockableInfoArea); - if (!this->m_parentDockableInfoArea) return nullptr; - return this->m_parentDockableInfoArea->getParentInfoArea(); - } - - CInfoArea *CEnableForDockWidgetInfoArea::getParentInfoArea() + CInfoArea *CEnableForDockWidgetInfoArea::getParentInfoArea() const { Q_ASSERT(this->m_parentDockableInfoArea); if (!this->m_parentDockableInfoArea) return nullptr; diff --git a/src/blackgui/components/enablefordockwidgetinfoarea.h b/src/blackgui/components/enablefordockwidgetinfoarea.h index ddf7bf3d8..fa1dbb5ae 100644 --- a/src/blackgui/components/enablefordockwidgetinfoarea.h +++ b/src/blackgui/components/enablefordockwidgetinfoarea.h @@ -29,10 +29,7 @@ namespace BlackGui { public: //! Corresponding dockable widget in info area - BlackGui::CDockWidgetInfoArea *getDockWidgetInfoArea() { return m_parentDockableInfoArea; } - - //! Corresponding dockable widget in info area - const BlackGui::CDockWidgetInfoArea *getDockWidgetInfoArea() const { return m_parentDockableInfoArea; } + BlackGui::CDockWidgetInfoArea *getDockWidgetInfoArea() const { return m_parentDockableInfoArea; } //! Has dock area? bool hasDockWidgetArea() const { return m_parentDockableInfoArea; } @@ -42,10 +39,7 @@ namespace BlackGui virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget); //! The parent info area - const CInfoArea *getParentInfoArea() const; - - //! The parent info area - CInfoArea *getParentInfoArea(); + CInfoArea *getParentInfoArea() const; //! Is the parent dockable widget floating? bool isParentDockWidgetFloating() const;