summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/addressbook-fr
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@nokia.com>2010-08-03 14:19:12 (GMT)
committerJerome Pasion <jerome.pasion@nokia.com>2010-08-03 14:19:12 (GMT)
commit14e17d5fe5f925a768aab9db9401e04bbaca224d (patch)
tree243a58f3d560fc610808ecefa75acadc67966fab /examples/tutorials/addressbook-fr
parent4a0e317156eefb308340668d586ceafd7cf978e6 (diff)
downloadQt-14e17d5fe5f925a768aab9db9401e04bbaca224d.zip
Qt-14e17d5fe5f925a768aab9db9401e04bbaca224d.tar.gz
Qt-14e17d5fe5f925a768aab9db9401e04bbaca224d.tar.bz2
Fixed the addressbook tutorial and some spelling mistakes. Fix for QTBUG-7071 and QTBUG-10173
Diffstat (limited to 'examples/tutorials/addressbook-fr')
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.cpp5
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.cpp3
6 files changed, 12 insertions, 7 deletions
diff --git a/examples/tutorials/addressbook-fr/part2/addressbook.cpp b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
index 1fa9d52..8d5b0e1 100644
--- a/examples/tutorials/addressbook-fr/part2/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part2/addressbook.cpp
@@ -111,7 +111,7 @@ void AddressBook::submitContact()
QString name = nameLine->text();
QString address = addressText->toPlainText();
- if (name == "" || address == "") {
+ if ( name.isEmpty()|| address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
return;
diff --git a/examples/tutorials/addressbook-fr/part3/addressbook.cpp b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
index 840f529..2d182c5 100644
--- a/examples/tutorials/addressbook-fr/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part3/addressbook.cpp
@@ -122,9 +122,10 @@ void AddressBook::submitContact()
QString name = nameLine->text();
QString address = addressText->toPlainText();
- if (name == "" || address == "") {
+ if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
if (!contacts.contains(name)) {
diff --git a/examples/tutorials/addressbook-fr/part4/addressbook.cpp b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
index f6390a4..d3bf030 100644
--- a/examples/tutorials/addressbook-fr/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part4/addressbook.cpp
@@ -131,9 +131,10 @@ void AddressBook::submitContact()
QString name = nameLine->text();
QString address = addressText->toPlainText();
- if (name == "" || address == "") {
+ if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
//! [submitContact() function part1]
if (currentMode == AddingMode) {
diff --git a/examples/tutorials/addressbook-fr/part5/addressbook.cpp b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
index 80c18c3..d5f5778 100644
--- a/examples/tutorials/addressbook-fr/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part5/addressbook.cpp
@@ -138,10 +138,11 @@ void AddressBook::submitContact()
QString name = nameLine->text();
QString address = addressText->toPlainText();
- if (name == "" || address == "") {
+ if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- }
+ return;
+ }
if (currentMode == AddingMode) {
diff --git a/examples/tutorials/addressbook-fr/part6/addressbook.cpp b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
index fc41190..7c57db7 100644
--- a/examples/tutorials/addressbook-fr/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part6/addressbook.cpp
@@ -144,9 +144,10 @@ void AddressBook::submitContact()
QString name = nameLine->text();
QString address = addressText->toPlainText();
- if (name == "" || address == "") {
+ if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
if (currentMode == AddingMode) {
diff --git a/examples/tutorials/addressbook-fr/part7/addressbook.cpp b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
index 3ab8702..b0f35a7 100644
--- a/examples/tutorials/addressbook-fr/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook-fr/part7/addressbook.cpp
@@ -146,9 +146,10 @@ void AddressBook::submitContact()
QString name = nameLine->text();
QString address = addressText->toPlainText();
- if (name == "" || address == "") {
+ if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
+ return;
}
if (currentMode == AddingMode) {