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:
parent
1104417022
commit
6c34fad9b6
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user