Commit 1e7ac49d authored by Laurent Montel's avatar Laurent Montel 😁

Fix compile it's a new api from qt5.15

parent 3cb2fc77
......@@ -716,10 +716,14 @@ void KfindTabWidget::setQuery(KQuery *query)
if (rb[0]->isChecked()) { // Between dates
const QDate &from = fromDate->date();
const QDate &to = toDate->date();
// do not generate negative numbers .. find doesn't handle that
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
time_t time1 = epoch.secsTo(QDateTime(from));
time_t time2 = epoch.secsTo(QDateTime(to.addDays(1))) - 1; // Include the last day
#else
time_t time1 = epoch.secsTo(QDateTime(from.startOfDay()));
time_t time2 = epoch.secsTo(QDateTime(to.addDays(1).startOfDay())) - 1; // Include the last day
#endif
query->setTimeRange(time1, time2);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment