summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorials/addressbook')
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp2
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp2
6 files changed, 6 insertions, 6 deletions
diff --git a/examples/tutorials/addressbook/part2/addressbook.cpp b/examples/tutorials/addressbook/part2/addressbook.cpp
index 1fa9d52..f2f0d65 100644
--- a/examples/tutorials/addressbook/part2/addressbook.cpp
+++ b/examples/tutorials/addressbook/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/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
index 28a570a..4e58fa1 100644
--- a/examples/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -122,7 +122,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/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
index 55d551f..896a427 100644
--- a/examples/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -131,7 +131,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/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp
index 1b3f451..874b151 100644
--- a/examples/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook/part5/addressbook.cpp
@@ -138,7 +138,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/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
index 724971c..a6bb4a5 100644
--- a/examples/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook/part6/addressbook.cpp
@@ -144,7 +144,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/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
index bf00298..fb70ba4 100644
--- a/examples/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook/part7/addressbook.cpp
@@ -146,7 +146,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;