aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/newdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_gui/newdialog.cpp')
-rw-r--r--qtmips_gui/newdialog.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/qtmips_gui/newdialog.cpp b/qtmips_gui/newdialog.cpp
index 062eb2d..cc23e2f 100644
--- a/qtmips_gui/newdialog.cpp
+++ b/qtmips_gui/newdialog.cpp
@@ -41,9 +41,9 @@ void NewDialog::cancel() {
void NewDialog::create() {
MainWindow *prnt = (MainWindow*)parent();
- machine::MachineConfig *mc = new machine::MachineConfig();
- mc->set_elf(ui->elf_file->text());
- mc->set_pipelined(ui->pipelined->isChecked());
+ machine::MachineConfig mc;
+ mc.set_elf(ui->elf_file->text());
+ mc.set_pipelined(ui->pipelined->isChecked());
// TODO other settings
try {
@@ -52,18 +52,15 @@ void NewDialog::create() {
QMessageBox msg(this);
msg.setText(e.msg(false));
msg.setIcon(QMessageBox::Critical);
- msg.setToolTip("Please check that ELF executable realy exists and is in correct format.");
+ msg.setToolTip("Please check that ELF executable really exists and is in correct format.");
msg.setDetailedText(e.msg(true));
msg.setWindowTitle("Error while initializing new machine");
msg.exec();
- goto cleanup;
+ return;
}
store_settings(); // Save to settings
this->close();
-
-cleanup:
- delete mc;
}
void NewDialog::browse_elf() {