2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-11 06:27:52 +00:00

General: Use unique_ptr for UI instances

Gets rid of the need for manual new and delete.
This commit is contained in:
Lioncash
2019-08-25 20:50:17 -04:00
parent a357648a99
commit 02e910c4ef
4 changed files with 20 additions and 17 deletions

View File

@@ -6,16 +6,13 @@
ArgumentEditor::ArgumentEditor(QWidget* parent)
: QDialog(parent)
, m_ui(new Ui::ArgumentEditor) {
, m_ui(std::make_unique<Ui::ArgumentEditor>()) {
m_ui->setupUi(this);
m_model.setStringList(QSettings().value("urde_arguments").toStringList());
m_ui->argumentEditor->setModel(&m_model);
}
ArgumentEditor::~ArgumentEditor() {
delete m_ui;
m_ui = nullptr;
}
ArgumentEditor::~ArgumentEditor() = default;
void ArgumentEditor::on_addButton_clicked() {
QInputDialog input(this);