diff options
Diffstat (limited to 'examples/tutorials/addressbook-fr/part3')
-rw-r--r-- | examples/tutorials/addressbook-fr/part3/addressbook.cpp | 4 | ||||
-rw-r--r-- | examples/tutorials/addressbook-fr/part3/main.cpp | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.cpp b/examples/tutorials/addressbook-fr/part3/addressbook.cpp index 9d6bedd..9e9b9c2 100644 --- a/examples/tutorials/addressbook-fr/part3/addressbook.cpp +++ b/examples/tutorials/addressbook-fr/part3/addressbook.cpp @@ -125,8 +125,7 @@ void AddressBook::submitContact() if (name == "" || address == "") { QMessageBox::information(this, tr("Empty Field"), - tr("Please enter a name and adderss.")); - return; + tr("Please enter a name and address.")); } if (!contacts.contains(name)) { @@ -136,7 +135,6 @@ void AddressBook::submitContact() } else { QMessageBox::information(this, tr("Add Unsuccessful"), tr("Sorry, \"%1\" is already in your address book.").arg(name)); - return; } if (contacts.isEmpty()) { diff --git a/examples/tutorials/addressbook-fr/part3/main.cpp b/examples/tutorials/addressbook-fr/part3/main.cpp index a359e48..c7e6dc3 100644 --- a/examples/tutorials/addressbook-fr/part3/main.cpp +++ b/examples/tutorials/addressbook-fr/part3/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(); } |