equal
deleted
inserted
replaced
144 void AddressBook::submitContact() |
144 void AddressBook::submitContact() |
145 { |
145 { |
146 QString name = nameLine->text(); |
146 QString name = nameLine->text(); |
147 QString address = addressText->toPlainText(); |
147 QString address = addressText->toPlainText(); |
148 |
148 |
149 if (name == "" || address == "") { |
149 if (name.isEmpty() || address.isEmpty()) { |
150 QMessageBox::information(this, tr("Empty Field"), |
150 QMessageBox::information(this, tr("Empty Field"), |
151 tr("Please enter a name and address.")); |
151 tr("Please enter a name and address.")); |
|
152 return; |
152 } |
153 } |
153 |
154 |
154 if (currentMode == AddingMode) { |
155 if (currentMode == AddingMode) { |
155 |
156 |
156 if (!contacts.contains(name)) { |
157 if (!contacts.contains(name)) { |