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