Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
a0841d67
Commit
a0841d67
authored
Mar 16, 2022
by
Volker Krause
Browse files
Make use of the new KContacts address formatting API when available
parent
914779e0
Pipeline
#151877
skipped
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/app/localizer.cpp
View file @
a0841d67
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment