diff --git a/src/Editor/CAboutDialog.cpp b/src/Editor/CAboutDialog.cpp index 1d339fdd..c7677e68 100644 --- a/src/Editor/CAboutDialog.cpp +++ b/src/Editor/CAboutDialog.cpp @@ -4,7 +4,7 @@ CAboutDialog::CAboutDialog(QWidget *parent) : QDialog(parent), - ui(new Ui::CAboutDialog) + ui(std::make_unique()) { ui->setupUi(this); @@ -13,7 +13,4 @@ CAboutDialog::CAboutDialog(QWidget *parent) : ui->AboutLabel->setText(LabelText); } -CAboutDialog::~CAboutDialog() -{ - delete ui; -} +CAboutDialog::~CAboutDialog() = default; diff --git a/src/Editor/CAboutDialog.h b/src/Editor/CAboutDialog.h index 8d778270..02f8588a 100644 --- a/src/Editor/CAboutDialog.h +++ b/src/Editor/CAboutDialog.h @@ -3,6 +3,8 @@ #include +#include + namespace Ui { class CAboutDialog; } @@ -12,11 +14,11 @@ class CAboutDialog : public QDialog Q_OBJECT public: - explicit CAboutDialog(QWidget *parent = 0); - ~CAboutDialog(); + explicit CAboutDialog(QWidget *parent = nullptr); + ~CAboutDialog() override; private: - Ui::CAboutDialog *ui; + std::unique_ptr ui; }; #endif // CABOUTDIALOG_H