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

Make it compile against qt5.15

parent 2f40db98
...@@ -86,7 +86,12 @@ void SearchRuleDateTest::shouldMatchDate() ...@@ -86,7 +86,12 @@ void SearchRuleDateTest::shouldMatchDate()
MailCommon::SearchRuleDate searchrule("<date>", function, matchdate.toString(Qt::ISODate)); MailCommon::SearchRuleDate searchrule("<date>", function, matchdate.toString(Qt::ISODate));
KMime::Message::Ptr msgPtr = KMime::Message::Ptr(new KMime::Message()); KMime::Message::Ptr msgPtr = KMime::Message::Ptr(new KMime::Message());
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
msgPtr->date(true)->setDateTime(QDateTime(maildate)); msgPtr->date(true)->setDateTime(QDateTime(maildate));
#else
msgPtr->date(true)->setDateTime(QDateTime(maildate.startOfDay()));
#endif
Akonadi::Item item; Akonadi::Item item;
item.setPayload<KMime::Message::Ptr>(msgPtr); item.setPayload<KMime::Message::Ptr>(msgPtr);
QCOMPARE(searchrule.matches(item), match); QCOMPARE(searchrule.matches(item), match);
......
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