mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix: check valid date in getDateWhereFindPhrase
This commit is contained in:
parent
ea9f429838
commit
c3095ab150
|
@ -540,6 +540,11 @@ QDateTime History::getDateWhereFindPhrase(const QString& friendPk, const QDateTi
|
|||
}
|
||||
|
||||
QDateTime date = from;
|
||||
|
||||
if (!date.isValid()) {
|
||||
date = QDateTime::currentDateTime();
|
||||
}
|
||||
|
||||
if (parameter.period == PeriodSearch::AfterDate || parameter.period == PeriodSearch::BeforeDate) {
|
||||
date = QDateTime(parameter.date);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user