CWorldInfoSidebar: Make use of in-class initializers where applicable
This commit is contained in:
parent
548e4ca708
commit
9b2bfd5bcd
|
@ -5,7 +5,7 @@
|
|||
|
||||
CWorldInfoSidebar::CWorldInfoSidebar(CWorldEditor *pEditor)
|
||||
: CWorldEditorSidebar(pEditor)
|
||||
, mpUI(new Ui::CWorldInfoSidebar)
|
||||
, mpUI(std::make_unique<Ui::CWorldInfoSidebar>())
|
||||
, mModel(pEditor)
|
||||
{
|
||||
mpUI->setupUi(this);
|
||||
|
@ -45,10 +45,7 @@ CWorldInfoSidebar::CWorldInfoSidebar(CWorldEditor *pEditor)
|
|||
mpUI->AreaNameSelector->SetEditable(false);
|
||||
}
|
||||
|
||||
CWorldInfoSidebar::~CWorldInfoSidebar()
|
||||
{
|
||||
delete mpUI;
|
||||
}
|
||||
CWorldInfoSidebar::~CWorldInfoSidebar() = default;
|
||||
|
||||
// ************ SLOTS ************
|
||||
void CWorldInfoSidebar::OnActiveProjectChanged(CGameProject *pProj)
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "CWorldEditorSidebar.h"
|
||||
#include "CWorldTreeModel.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
class CWorldEditor;
|
||||
|
||||
namespace Ui {
|
||||
|
@ -16,13 +18,13 @@ class CWorldInfoSidebar : public CWorldEditorSidebar
|
|||
{
|
||||
Q_OBJECT
|
||||
|
||||
Ui::CWorldInfoSidebar *mpUI;
|
||||
std::unique_ptr<Ui::CWorldInfoSidebar> mpUI;
|
||||
CWorldTreeModel mModel;
|
||||
CWorldTreeProxyModel mProxyModel;
|
||||
|
||||
public:
|
||||
explicit CWorldInfoSidebar(CWorldEditor *pEditor);
|
||||
~CWorldInfoSidebar();
|
||||
~CWorldInfoSidebar() override;
|
||||
|
||||
public slots:
|
||||
void OnActiveProjectChanged(CGameProject *pProj);
|
||||
|
|
Loading…
Reference in New Issue