CProjectSettingsDialog: Make use of in-class initializers where applicable
This commit is contained in:
parent
152d638f7a
commit
2b19b7584d
|
@ -20,8 +20,7 @@
|
|||
|
||||
CProjectSettingsDialog::CProjectSettingsDialog(QWidget *pParent)
|
||||
: QDialog(pParent)
|
||||
, mpUI(new Ui::CProjectSettingsDialog)
|
||||
, mpProject(nullptr)
|
||||
, mpUI(std::make_unique<Ui::CProjectSettingsDialog>())
|
||||
{
|
||||
mpUI->setupUi(this);
|
||||
|
||||
|
@ -42,10 +41,7 @@ CProjectSettingsDialog::CProjectSettingsDialog(QWidget *pParent)
|
|||
mpUI->BuildIsoButton->setPalette(Palette);
|
||||
}
|
||||
|
||||
CProjectSettingsDialog::~CProjectSettingsDialog()
|
||||
{
|
||||
delete mpUI;
|
||||
}
|
||||
CProjectSettingsDialog::~CProjectSettingsDialog() = default;
|
||||
|
||||
void CProjectSettingsDialog::ActiveProjectChanged(CGameProject *pProj)
|
||||
{
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <Core/Resource/CWorld.h>
|
||||
#include <QDialog>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace Ui {
|
||||
class CProjectSettingsDialog;
|
||||
}
|
||||
|
@ -13,16 +15,16 @@ class CProjectSettingsDialog;
|
|||
class CProjectSettingsDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
Ui::CProjectSettingsDialog *mpUI;
|
||||
CGameProject *mpProject;
|
||||
std::unique_ptr<Ui::CProjectSettingsDialog> mpUI;
|
||||
CGameProject *mpProject = nullptr;
|
||||
|
||||
QVector<CResourceEntry*> mWorldEntries;
|
||||
QVector<CResourceEntry*> mAreaEntries;
|
||||
TResPtr<CWorld> mpWorld;
|
||||
|
||||
public:
|
||||
explicit CProjectSettingsDialog(QWidget *pParent = 0);
|
||||
~CProjectSettingsDialog();
|
||||
explicit CProjectSettingsDialog(QWidget *pParent = nullptr);
|
||||
~CProjectSettingsDialog() override;
|
||||
|
||||
public slots:
|
||||
void ActiveProjectChanged(CGameProject *pProj);
|
||||
|
|
Loading…
Reference in New Issue