aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-08-09 16:25:22 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-08-26 20:17:45 +0300
commitb02264cb5dfcef50eec8a6346471cbaa25370e00 (patch)
treeebb8d389eeca173ce700c07b27303af05d6d7342 /src/qt/guiutil.cpp
parent93ab136a33e46080c8aa02d59fb7c2a8d03a3387 (diff)
downloadbitcoin-b02264cb5dfcef50eec8a6346471cbaa25370e00.tar.xz
qt, refactor: Fix 'QDateTime is deprecated' warnings
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index bab17562a6..72bc4fcddd 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -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