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

Port deprecated methods

parent 5fb4d9dd
......@@ -1142,7 +1142,11 @@ void MergeContactsTest::checkNeedManualSelectionWithBirthday()
Addressee addressA;
Akonadi::Item itemA;
QDate date = QDate::fromString(nameItemA, QStringLiteral("yyyyMMdd"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
QDateTime dt(date);
#else
QDateTime dt(date.startOfDay());
#endif
addressA.setBirthday(dt);
itemA.setPayload<Addressee>(addressA);
lst << itemA;
......@@ -1150,7 +1154,12 @@ void MergeContactsTest::checkNeedManualSelectionWithBirthday()
Addressee addressB;
Akonadi::Item itemB;
date = QDate::fromString(nameItemB, QStringLiteral("yyyyMMdd"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
dt = QDateTime(date);
#else
dt = QDateTime(date.startOfDay());
#endif
addressB.setBirthday(dt);
itemB.setPayload<Addressee>(addressB);
lst << itemB;
......@@ -1158,7 +1167,11 @@ void MergeContactsTest::checkNeedManualSelectionWithBirthday()
Addressee addressC;
Akonadi::Item itemC;
date = QDate::fromString(nameItemC, QStringLiteral("yyyyMMdd"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
dt = QDateTime(date);
#else
dt = QDateTime(date.startOfDay());
#endif
addressC.setBirthday(dt);
itemC.setPayload<Addressee>(addressC);
lst << itemC;
......
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