mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-01 19:03:36 +00:00
CLayerEditor: Make use of in-class initializers where applicable
This commit is contained in:
parent
86bca47221
commit
d537cfd4b2
@ -6,9 +6,8 @@
|
||||
|
||||
CLayerEditor::CLayerEditor(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::CLayerEditor)
|
||||
, mpArea(nullptr)
|
||||
, mpModel(new CLayerModel(this))
|
||||
, ui(std::make_unique<Ui::CLayerEditor>())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->LayerSelectComboBox->setModel(mpModel);
|
||||
@ -18,10 +17,7 @@ CLayerEditor::CLayerEditor(QWidget *parent)
|
||||
connect(ui->ActiveCheckBox, SIGNAL(toggled(bool)), this, SLOT(EditLayerActive(bool)));
|
||||
}
|
||||
|
||||
CLayerEditor::~CLayerEditor()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
CLayerEditor::~CLayerEditor() = default;
|
||||
|
||||
void CLayerEditor::SetArea(CGameArea *pArea)
|
||||
{
|
||||
|
@ -13,10 +13,10 @@ class CLayerEditor : public QDialog
|
||||
Q_OBJECT
|
||||
TResPtr<CGameArea> mpArea;
|
||||
CLayerModel *mpModel;
|
||||
CScriptLayer *mpCurrentLayer;
|
||||
CScriptLayer *mpCurrentLayer = nullptr;
|
||||
|
||||
public:
|
||||
explicit CLayerEditor(QWidget *parent = 0);
|
||||
explicit CLayerEditor(QWidget *parent = nullptr);
|
||||
~CLayerEditor();
|
||||
void SetArea(CGameArea *pArea);
|
||||
|
||||
@ -26,7 +26,7 @@ public slots:
|
||||
void EditLayerActive(bool Active);
|
||||
|
||||
private:
|
||||
Ui::CLayerEditor *ui;
|
||||
std::unique_ptr<Ui::CLayerEditor> ui;
|
||||
};
|
||||
|
||||
#endif // CLAYEREDITOR_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user