WInstancesTab: Make use of in-class initializers where applicable
This commit is contained in:
parent
719fed015e
commit
a3bfb3cc7c
|
@ -9,7 +9,7 @@
|
|||
|
||||
WInstancesTab::WInstancesTab(CWorldEditor *pEditor, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::WInstancesTab)
|
||||
ui(std::make_unique<Ui::WInstancesTab>())
|
||||
{
|
||||
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)
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include <QAction>
|
||||
#include <QMenu>
|
||||
|
||||
#include <memory>
|
||||
|
||||
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::WInstancesTab> ui;
|
||||
};
|
||||
|
||||
#endif // WINSTANCESTAB_H
|
||||
|
|
Loading…
Reference in New Issue