diff options
Diffstat (limited to 'examples/tutorials/addressbook-fr/part7')
-rw-r--r-- | examples/tutorials/addressbook-fr/part7/addressbook.cpp | 3 | ||||
-rw-r--r-- | examples/tutorials/addressbook-fr/part7/main.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.cpp b/examples/tutorials/addressbook-fr/part7/addressbook.cpp index 2f81d2b..8be4d2b 100644 --- a/examples/tutorials/addressbook-fr/part7/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part7/addressbook.cpp @@ -150,7 +150,6 @@ void AddressBook::submitContact() if (name == "" || address == "") { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); - return; } if (currentMode == AddingMode) { @@ -162,7 +161,6 @@ void AddressBook::submitContact() } else { QMessageBox::information(this, tr("Add Unsuccessful"), tr("Sorry, \"%1\" is already in your address book.").arg(name)); - return; } } else if (currentMode == EditingMode) { @@ -175,7 +173,6 @@ void AddressBook::submitContact() } else { QMessageBox::information(this, tr("Edit Unsuccessful"), tr("Sorry, \"%1\" is already in your address book.").arg(name)); - return; } } else if (oldAddress != address) { QMessageBox::information(this, tr("Edit Successful"), diff --git a/examples/tutorials/addressbook-fr/part7/main.cpp b/examples/tutorials/addressbook-fr/part7/main.cpp index b25d656..46f6f03 100644 --- a/examples/tutorials/addressbook-fr/part7/main.cpp +++ b/examples/tutorials/addressbook-fr/part7/main.cpp @@ -46,8 +46,8 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - AddressBook *addressBook = new AddressBook; - addressBook->show(); + AddressBook addressBook; + addressBook.show(); return app.exec(); } |