mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 14:40:12 +01:00
qt, refactor: Fix 'QDateTime is deprecated' warnings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user