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

Port deprecated methods

parent 3d8a3ae9
......@@ -145,7 +145,11 @@ void CalendarResource::retrieveItems(const Akonadi::Collection &collection)
}
if (!Settings::self()->eventsSince().isEmpty()) {
const QDate date = QDate::fromString(Settings::self()->eventsSince(), Qt::ISODate);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
fetchJob->setTimeMin(QDateTime(date).toSecsSinceEpoch());
#else
fetchJob->setTimeMin(QDateTime(date.startOfDay()).toSecsSinceEpoch());
#endif
}
job = fetchJob;
} else if (collection.contentMimeTypes().contains(KCalendarCore::Todo::todoMimeType())) {
......
......@@ -1193,7 +1193,11 @@ void Contact::saveTo(KContacts::Addressee *addressee)
addressee->setNickName(nickName());
addressee->insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-SpousesName"), spouseName());
if (birthday().isValid()) {
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
addressee->setBirthday(QDateTime(birthday()));
#else
addressee->setBirthday(QDateTime(birthday().startOfDay()));
#endif
}
if (anniversary().isValid()) {
......
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