1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(history): Fix qt deprecation warning

Qt 5.15 has QDateTime(QDate()) deprecated. Fix a usage of the deprecated
constructor introduced in parent commit
This commit is contained in:
Mick Sayson 2021-09-12 15:44:02 -07:00 committed by Anthony Bilinski
parent 1104417022
commit 6c34fad9b6
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -1146,7 +1146,12 @@ QDateTime History::getDateWhereFindPhrase(const ToxPk& friendPk, const QDateTime
} }
if (parameter.period == PeriodSearch::AfterDate || parameter.period == PeriodSearch::BeforeDate) { if (parameter.period == PeriodSearch::AfterDate || parameter.period == PeriodSearch::BeforeDate) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
date = parameter.date.startOfDay();
#else
date = QDateTime(parameter.date); date = QDateTime(parameter.date);
#endif
} }
QString period; QString period;