Make selectedPage const 🤦‍♀️

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2023-06-22 13:11:55 +01:00
parent 1f16380efc
commit dea33a3c1d
5 changed files with 5 additions and 5 deletions

View File

@ -264,7 +264,7 @@ bool InstanceWindow::selectPage(QString pageId)
return m_container->selectPage(pageId); return m_container->selectPage(pageId);
} }
BasePage* InstanceWindow::selectedPage() BasePage* InstanceWindow::selectedPage() const
{ {
return m_container->selectedPage(); return m_container->selectedPage();
} }

View File

@ -57,7 +57,7 @@ public:
virtual ~InstanceWindow(); virtual ~InstanceWindow();
bool selectPage(QString pageId) override; bool selectPage(QString pageId) override;
BasePage* selectedPage() override; BasePage* selectedPage() const override;
void refreshContainer() override; void refreshContainer() override;
QString instanceId(); QString instanceId();

View File

@ -7,7 +7,7 @@ class BasePageContainer
public: public:
virtual ~BasePageContainer(){}; virtual ~BasePageContainer(){};
virtual bool selectPage(QString pageId) = 0; virtual bool selectPage(QString pageId) = 0;
virtual BasePage* selectedPage() = 0; virtual BasePage* selectedPage() const = 0;
virtual BasePage* getPage(QString pageId) { return nullptr; }; virtual BasePage* getPage(QString pageId) { return nullptr; };
virtual void refreshContainer() = 0; virtual void refreshContainer() = 0;
virtual bool requestClose() = 0; virtual bool requestClose() = 0;

View File

@ -138,7 +138,7 @@ BasePage* PageContainer::getPage(QString pageId)
return m_model->findPageEntryById(pageId); return m_model->findPageEntryById(pageId);
} }
BasePage* PageContainer::selectedPage() BasePage* PageContainer::selectedPage() const
{ {
return m_currentPage; return m_currentPage;
} }

View File

@ -80,7 +80,7 @@ public:
} }
bool selectPage(QString pageId) override; bool selectPage(QString pageId) override;
BasePage* selectedPage() override; BasePage* selectedPage() const override;
BasePage* getPage(QString pageId) override; BasePage* getPage(QString pageId) override;
const QList<BasePage*> getPages() const; const QList<BasePage*> getPages() const;