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

it's a new api

parent f9ac5582
...@@ -269,7 +269,11 @@ private Q_SLOTS: ...@@ -269,7 +269,11 @@ private Q_SLOTS:
addressee.setFormattedName(QStringLiteral("John Doe")); addressee.setFormattedName(QStringLiteral("John Doe"));
addressee.setNickName(QStringLiteral("JD")); addressee.setNickName(QStringLiteral("JD"));
addressee.setEmails(QStringList() << QStringLiteral("john@test.com")); addressee.setEmails(QStringList() << QStringLiteral("john@test.com"));
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
addressee.setBirthday(QDateTime(QDate(2000, 01, 01)));
#else
addressee.setBirthday(QDateTime(QDate(2000, 01, 01).startOfDay())); addressee.setBirthday(QDateTime(QDate(2000, 01, 01).startOfDay()));
#endif
Akonadi::Item item(KContacts::Addressee::mimeType()); Akonadi::Item item(KContacts::Addressee::mimeType());
item.setId(100); item.setId(100);
item.setPayload(addressee); item.setPayload(addressee);
...@@ -281,7 +285,11 @@ private Q_SLOTS: ...@@ -281,7 +285,11 @@ private Q_SLOTS:
addressee.setUid(QStringLiteral("uid2")); addressee.setUid(QStringLiteral("uid2"));
addressee.setName(QStringLiteral("Jane Doe")); addressee.setName(QStringLiteral("Jane Doe"));
addressee.setEmails(QStringList() << QStringLiteral("jane@test.com")); addressee.setEmails(QStringList() << QStringLiteral("jane@test.com"));
addressee.setBirthday(QDateTime(QDate(2001, 01, 01).startOfDay())); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
addressee.setBirthday(QDateTime(QDate(2000, 01, 01)));
#else
addressee.setBirthday(QDateTime(QDate(2000, 01, 01).startOfDay()));
#endif
Akonadi::Item item(KContacts::Addressee::mimeType()); Akonadi::Item item(KContacts::Addressee::mimeType());
item.setId(101); item.setId(101);
item.setPayload(addressee); item.setPayload(addressee);
...@@ -293,7 +301,11 @@ private Q_SLOTS: ...@@ -293,7 +301,11 @@ private Q_SLOTS:
addressee.setUid(QStringLiteral("uid2")); addressee.setUid(QStringLiteral("uid2"));
addressee.setName(QStringLiteral("Jane Doe")); addressee.setName(QStringLiteral("Jane Doe"));
addressee.setEmails(QStringList() << QStringLiteral("JANE@TEST.COM")); addressee.setEmails(QStringList() << QStringLiteral("JANE@TEST.COM"));
addressee.setBirthday(QDateTime(QDate(2001, 01, 01).startOfDay())); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
addressee.setBirthday(QDateTime(QDate(2000, 01, 01)));
#else
addressee.setBirthday(QDateTime(QDate(2000, 01, 01).startOfDay()));
#endif
Akonadi::Item item(KContacts::Addressee::mimeType()); Akonadi::Item item(KContacts::Addressee::mimeType());
item.setId(102); item.setId(102);
item.setPayload(addressee); item.setPayload(addressee);
...@@ -305,7 +317,11 @@ private Q_SLOTS: ...@@ -305,7 +317,11 @@ private Q_SLOTS:
addressee.setUid(QStringLiteral("abcd-efgh-1234-5678")); addressee.setUid(QStringLiteral("abcd-efgh-1234-5678"));
addressee.setName(QStringLiteral("Dan Vrátil")); addressee.setName(QStringLiteral("Dan Vrátil"));
addressee.setEmails({ QStringLiteral("dan@test.com") }); addressee.setEmails({ QStringLiteral("dan@test.com") });
addressee.setBirthday(QDateTime(QDate(2001, 01, 01).startOfDay())); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
addressee.setBirthday(QDateTime(QDate(2000, 01, 01)));
#else
addressee.setBirthday(QDateTime(QDate(2000, 01, 01).startOfDay()));
#endif
Akonadi::Item item(KContacts::Addressee::mimeType()); Akonadi::Item item(KContacts::Addressee::mimeType());
item.setId(105); item.setId(105);
item.setPayload(addressee); item.setPayload(addressee);
......
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