CSelectInstanceDialog: Make use of in-class initializers where applicable
This commit is contained in:
parent
51ba06f7c4
commit
5a041dd474
|
@ -3,13 +3,10 @@
|
|||
|
||||
CSelectInstanceDialog::CSelectInstanceDialog(CWorldEditor *pEditor, QWidget *pParent)
|
||||
: QDialog(pParent)
|
||||
, ui(new Ui::CSelectInstanceDialog)
|
||||
, mpEditor(pEditor)
|
||||
, mLayersModel(pEditor, this)
|
||||
, mTypesModel(pEditor, this)
|
||||
, mValidSelection(false)
|
||||
, mpLayersInst(nullptr)
|
||||
, mpTypesInst(nullptr)
|
||||
, ui(std::make_unique<Ui::CSelectInstanceDialog>())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -45,10 +42,7 @@ CSelectInstanceDialog::CSelectInstanceDialog(CWorldEditor *pEditor, QWidget *pPa
|
|||
connect(ui->TypesTreeView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(OnTreeDoubleClicked(QModelIndex)));
|
||||
}
|
||||
|
||||
CSelectInstanceDialog::~CSelectInstanceDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
CSelectInstanceDialog::~CSelectInstanceDialog() = default;
|
||||
|
||||
CScriptObject* CSelectInstanceDialog::SelectedInstance() const
|
||||
{
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <QDialog>
|
||||
#include <QSortFilterProxyModel>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Ui {
|
||||
class CSelectInstanceDialog;
|
||||
}
|
||||
|
@ -20,15 +22,15 @@ class CSelectInstanceDialog : public QDialog
|
|||
CInstancesProxyModel mLayersProxyModel;
|
||||
CInstancesProxyModel mTypesProxyModel;
|
||||
|
||||
bool mValidSelection;
|
||||
CScriptObject *mpLayersInst;
|
||||
CScriptObject *mpTypesInst;
|
||||
bool mValidSelection = false;
|
||||
CScriptObject *mpLayersInst = nullptr;
|
||||
CScriptObject *mpTypesInst = nullptr;
|
||||
|
||||
Ui::CSelectInstanceDialog *ui;
|
||||
std::unique_ptr<Ui::CSelectInstanceDialog> ui;
|
||||
|
||||
public:
|
||||
explicit CSelectInstanceDialog(CWorldEditor *pEditor, QWidget *pParent = 0);
|
||||
~CSelectInstanceDialog();
|
||||
explicit CSelectInstanceDialog(CWorldEditor *pEditor, QWidget *pParent = nullptr);
|
||||
~CSelectInstanceDialog() override;
|
||||
|
||||
CScriptObject* SelectedInstance() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue