Browse Source

Merge pull request #5467

TriKriSta (1):
      fix: check valid date in getDateWhereFindPhrase
reviewable/pr5471/r3
sudden6 7 years ago
parent
commit
ed821462c9
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 5
      src/persistence/history.cpp

5
src/persistence/history.cpp

@ -540,6 +540,11 @@ QDateTime History::getDateWhereFindPhrase(const QString& friendPk, const QDateTi @@ -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…
Cancel
Save