Commit b19c064f authored by hjk's avatar hjk

examples: fix some krazy warnings

parent 596e1940
......@@ -95,7 +95,7 @@ void AddressBook::submitContact()
QString name = ui->nameLine->text();
QString address = ui->addressText->toPlainText();
if (name == "" || address == "") {
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
return;
......
......@@ -102,7 +102,7 @@ void AddressBook::submitContact()
QString name = ui->nameLine->text();
QString address = ui->addressText->toPlainText();
if (name == "" || address == "") {
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
return;
......
......@@ -101,7 +101,7 @@ void AddressBook::submitContact()
QString name = ui->nameLine->text();
QString address = ui->addressText->toPlainText();
if (name == "" || address == "") {
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
}
......
......@@ -96,7 +96,7 @@ void AddressBook::submitContact()
QString name = ui->nameLine->text();
QString address = ui->addressText->toPlainText();
if (name == "" || address == "") {
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
updateInterface(NavigationMode);
......
......@@ -102,7 +102,7 @@ void AddressBook::submitContact()
QString name = ui->nameLine->text();
QString address = ui->addressText->toPlainText();
if (name == "" || address == "") {
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
updateInterface(NavigationMode);
......
......@@ -99,7 +99,7 @@ void AddressBook::submitContact()
QString name = ui->nameLine->text();
QString address = ui->addressText->toPlainText();
if (name == "" || address == "") {
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
updateInterface(NavigationMode);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment