Commit 0b3c92a2 authored by Volker Krause's avatar Volker Krause
Browse files

Prepare for ISOtoCountry being deprecated

It's no longer needed for address formatting with 5.89 anyway, as the
formatting code expands country codes now.
parent ca9ed207
Pipeline #98539 passed with stage
in 13 minutes and 54 seconds
......@@ -29,6 +29,7 @@
#include <KCalendarCore/Event>
#endif
#include <kcontacts_version.h>
#include <KContacts/Address>
#include <KLocalizedString>
......@@ -45,7 +46,11 @@ static QString formatAddress(const PostalAddress &addr)
a.setStreet(addr.streetAddress());
a.setPostalCode(addr.postalCode());
a.setLocality(addr.addressLocality());
#if KContacts_VERSION <= QT_VERSION_CHECK(5, 88, 0)
a.setCountry(KContacts::Address::ISOtoCountry(addr.addressCountry()));
#else
a.setCountry(addr.addressCountry());
#endif
return a.formattedAddress();
}
......
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