Commit a0841d67 authored by Volker Krause's avatar Volker Krause
Browse files

Make use of the new KContacts address formatting API when available

parent 914779e0
Pipeline #151877 skipped
......@@ -9,6 +9,7 @@
#include <KItinerary/JsonLdDocument>
#include <KItinerary/Place>
#include <kcontacts_version.h>
#include <KContacts/Address>
#include <KCountry>
......@@ -69,7 +70,11 @@ QString Localizer::formatAddress(const QVariant &obj) const
return {};
}
#if KContacts_VERSION < QT_VERSION_CHECK(5, 92, 0)
return address.formattedAddress().replace(QLatin1String("\n\n"), QLatin1String("\n")).trimmed();
#else
return address.formatted(KContacts::AddressFormatStyle::MultiLineInternational);
#endif
}
static bool needsTimeZone(const QDateTime &dt)
......
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