Commit dce31b90 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile without depercated method

parent 438c5676
Pipeline #146696 passed with stage
in 2 minutes and 37 seconds
......@@ -85,7 +85,7 @@ endif()
########### Targets ###########
ecm_set_disabled_deprecation_versions(QT 5.14.0 KF 5.91.0)
ecm_set_disabled_deprecation_versions(QT 5.14.0 KF 5.92.0)
if(BUILD_TESTING)
......
......@@ -99,14 +99,14 @@ QVariant ContactsTreeModel::entityData(const Item &item, int column, int role) c
case HomeAddress: {
const KContacts::Address address = contact.address(KContacts::Address::Home);
if (!address.isEmpty()) {
return address.formattedAddress();
return address.formatted(KContacts::AddressFormatStyle::Postal);
}
break;
}
case BusinessAddress: {
const KContacts::Address address = contact.address(KContacts::Address::Work);
if (!address.isEmpty()) {
return address.formattedAddress();
return address.formatted(KContacts::AddressFormatStyle::Postal);
}
break;
}
......
......@@ -146,7 +146,7 @@ QString StandardContactFormatter::toHtml(HtmlForm form) const
QString formattedAddress;
if (address.label().isEmpty()) {
formattedAddress = address.formattedAddress().trimmed().toHtmlEscaped();
formattedAddress = address.formatted(KContacts::AddressFormatStyle::Postal).trimmed().toHtmlEscaped();
} else {
formattedAddress = address.label().toHtmlEscaped();
}
......
......@@ -80,7 +80,7 @@ QVariant AddressModel::data(const QModelIndex &index, int role) const
if (!addr.label().isEmpty()) {
str += addr.label().toHtmlEscaped().replace(QLatin1Char('\n'), QLatin1String("<br/>"));
} else {
str += addr.formattedAddress().trimmed().toHtmlEscaped().replace(QLatin1Char('\n'), QLatin1String("<br/>"));
str += addr.formatted(KContacts::AddressFormatStyle::Postal).trimmed().toHtmlEscaped().replace(QLatin1Char('\n'), QLatin1String("<br/>"));
}
return str;
}
......
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