qt, refactor: Fix 'QDateTime is deprecated' warnings

This commit is contained in:
Hennadii Stepanov
2020-08-09 16:25:22 +03:00
parent 93ab136a33
commit b02264cb5d
8 changed files with 31 additions and 10 deletions

View File

@@ -920,4 +920,13 @@ void PopupMenu(QMenu* menu, const QPoint& point, QAction* at_action)
menu->popup(point, at_action);
}
QDateTime StartOfDay(const QDate& date)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
return date.startOfDay();
#else
return QDateTime(date);
#endif
}
} // namespace GUIUtil