Commit 4a40b024 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't add empty address

parent ee18595b
......@@ -206,8 +206,9 @@ void AddressLocationWidget::fillCountryCombo()
void AddressLocationWidget::slotAddAddress()
{
KContacts::Address addr = address();
if (!addr.isEmpty()) {
const KContacts::Address addr = address();
if (!mLocalityEdit->text().trimmed().isEmpty() || !mRegionEdit->text().trimmed().isEmpty() || !mPostalCodeEdit->text().trimmed().isEmpty()
|| !mStreetEdit->text().trimmed().isEmpty() || !mPOBoxEdit->text().trimmed().isEmpty()) {
Q_EMIT addNewAddress(addr);
reset();
}
......
Supports Markdown
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