浏览代码

merged improvements and fixes from devel-newmaster-newpilot

fiffty-50 4 年之前
父节点
当前提交
3cbe6cb40c
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/gui/dialogues/newtaildialog.cpp

+ 6 - 6
src/gui/dialogues/newtaildialog.cpp

@@ -285,9 +285,9 @@ void NewTailDialog::on_buttonBox_accepted()
 {
 {
     DEB("Button Box Accepted.");
     DEB("Button Box Accepted.");
     if (ui->registrationLineEdit->text().isEmpty()) {
     if (ui->registrationLineEdit->text().isEmpty()) {
-        auto nope = new QMessageBox(this);
-        nope->setText("Registration cannot be empty.");
-        nope->show();
+        auto nope = QMessageBox(this);
+        nope.setText("Registration cannot be empty.");
+        nope.exec();
     } else {
     } else {
         if (verify()) {
         if (verify()) {
             DEB("Form verified");
             DEB("Form verified");
@@ -295,10 +295,10 @@ void NewTailDialog::on_buttonBox_accepted()
             accept();
             accept();
         } else {
         } else {
             if (!Settings::read("userdata/acAllowIncomplete").toInt()) {
             if (!Settings::read("userdata/acAllowIncomplete").toInt()) {
-                auto nope = new QMessageBox(this);
-                nope->setText("Some or all fields are empty.\nPlease go back and "
+                auto nope = QMessageBox(this);
+                nope.setText("Some or all fields are empty.\nPlease go back and "
                               "complete the form.\n\nYou can allow logging incomplete entries on the settings page.");
                               "complete the form.\n\nYou can allow logging incomplete entries on the settings page.");
-                nope->show();
+                nope.exec();
             } else {
             } else {
                 QMessageBox::StandardButton reply;
                 QMessageBox::StandardButton reply;
                 reply = QMessageBox::question(this, "Warning",
                 reply = QMessageBox::question(this, "Warning",