From b02264cb5dfcef50eec8a6346471cbaa25370e00 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 9 Aug 2020 16:25:22 +0300 Subject: qt, refactor: Fix 'QDateTime is deprecated' warnings --- src/qt/guiutil.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/qt/guiutil.h') diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h index 2bd94b5eb3..9ce5275e10 100644 --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -289,7 +289,7 @@ namespace GUIUtil /** * Returns the distance in pixels appropriate for drawing a subsequent character after text. * - * In Qt 5.12 and before the QFontMetrics::width() is used and it is deprecated since Qt 13.0. + * In Qt 5.12 and before the QFontMetrics::width() is used and it is deprecated since Qt 5.13. * In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced. */ int TextWidth(const QFontMetrics& fm, const QString& text); @@ -303,6 +303,15 @@ namespace GUIUtil * Call QMenu::popup() only on supported QT_QPA_PLATFORM. */ void PopupMenu(QMenu* menu, const QPoint& point, QAction* at_action = nullptr); + + /** + * Returns the start-moment of the day in local time. + * + * QDateTime::QDateTime(const QDate& date) is deprecated since Qt 5.15. + * QDate::startOfDay() was introduced in Qt 5.14. + */ + QDateTime StartOfDay(const QDate& date); + } // namespace GUIUtil #endif // BITCOIN_QT_GUIUTIL_H -- cgit v1.2.3