Browse Source

fix: check valid date in getDateWhereFindPhrase

reviewable/pr5467/r1
TriKriSta 7 years ago
parent
commit
c3095ab150
  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