diff --git a/src/Editor/WorldEditor/WInstancesTab.cpp b/src/Editor/WorldEditor/WInstancesTab.cpp index f6e80c3a..53adf608 100644 --- a/src/Editor/WorldEditor/WInstancesTab.cpp +++ b/src/Editor/WorldEditor/WInstancesTab.cpp @@ -9,7 +9,7 @@ WInstancesTab::WInstancesTab(CWorldEditor *pEditor, QWidget *parent) : QWidget(parent), - ui(new Ui::WInstancesTab) + ui(std::make_unique()) { ui->setupUi(this); @@ -74,10 +74,7 @@ WInstancesTab::WInstancesTab(CWorldEditor *pEditor, QWidget *parent) : connect(mpUnhideAll, SIGNAL(triggered()), this, SLOT(OnUnhideAll())); } -WInstancesTab::~WInstancesTab() -{ - delete ui; -} +WInstancesTab::~WInstancesTab() = default; // ************ PRIVATE SLOTS ************ void WInstancesTab::OnTreeClick(QModelIndex Index) diff --git a/src/Editor/WorldEditor/WInstancesTab.h b/src/Editor/WorldEditor/WInstancesTab.h index 5602291c..a05f8050 100644 --- a/src/Editor/WorldEditor/WInstancesTab.h +++ b/src/Editor/WorldEditor/WInstancesTab.h @@ -8,6 +8,8 @@ #include #include +#include + class CWorldEditor; class CScene; @@ -43,8 +45,8 @@ class WInstancesTab : public QWidget CInstancesModel::EIndexType mMenuIndexType; public: - explicit WInstancesTab(CWorldEditor *pEditor, QWidget *parent = 0); - ~WInstancesTab(); + explicit WInstancesTab(CWorldEditor *pEditor, QWidget *parent = nullptr); + ~WInstancesTab() override; private slots: void OnTreeClick(QModelIndex Index); @@ -61,7 +63,7 @@ private slots: void ExpandTopLevelItems(); private: - Ui::WInstancesTab *ui; + std::unique_ptr ui; }; #endif // WINSTANCESTAB_H