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) :
|
WInstancesTab::WInstancesTab(CWorldEditor *pEditor, QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::WInstancesTab)
|
ui(std::make_unique<Ui::WInstancesTab>())
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -74,10 +74,7 @@ WInstancesTab::WInstancesTab(CWorldEditor *pEditor, QWidget *parent) :
|
||||||
connect(mpUnhideAll, SIGNAL(triggered()), this, SLOT(OnUnhideAll()));
|
connect(mpUnhideAll, SIGNAL(triggered()), this, SLOT(OnUnhideAll()));
|
||||||
}
|
}
|
||||||
|
|
||||||
WInstancesTab::~WInstancesTab()
|
WInstancesTab::~WInstancesTab() = default;
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ************ PRIVATE SLOTS ************
|
// ************ PRIVATE SLOTS ************
|
||||||
void WInstancesTab::OnTreeClick(QModelIndex Index)
|
void WInstancesTab::OnTreeClick(QModelIndex Index)
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
class CWorldEditor;
|
class CWorldEditor;
|
||||||
class CScene;
|
class CScene;
|
||||||
|
|
||||||
|
@ -43,8 +45,8 @@ class WInstancesTab : public QWidget
|
||||||
CInstancesModel::EIndexType mMenuIndexType;
|
CInstancesModel::EIndexType mMenuIndexType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit WInstancesTab(CWorldEditor *pEditor, QWidget *parent = 0);
|
explicit WInstancesTab(CWorldEditor *pEditor, QWidget *parent = nullptr);
|
||||||
~WInstancesTab();
|
~WInstancesTab() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void OnTreeClick(QModelIndex Index);
|
void OnTreeClick(QModelIndex Index);
|
||||||
|
@ -61,7 +63,7 @@ private slots:
|
||||||
void ExpandTopLevelItems();
|
void ExpandTopLevelItems();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::WInstancesTab *ui;
|
std::unique_ptr<Ui::WInstancesTab> ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WINSTANCESTAB_H
|
#endif // WINSTANCESTAB_H
|
||||||
|
|
Loading…
Reference in New Issue