mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #5467
TriKriSta (1): fix: check valid date in getDateWhereFindPhrase
This commit is contained in:
commit
ed821462c9
|
@ -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