From 60bd9662cd00d81083bbdef044ae9fd1d2153a19 Mon Sep 17 00:00:00 2001 From: LoudSnorer Date: Fri, 1 Dec 2023 08:32:27 -0500 Subject: [PATCH] Fix obsolescence issue. QDateTime startOfDay was added in 5.14 --- oscar/Graphs/gXAxis.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/oscar/Graphs/gXAxis.cpp b/oscar/Graphs/gXAxis.cpp index cd59eca5..d4346306 100644 --- a/oscar/Graphs/gXAxis.cpp +++ b/oscar/Graphs/gXAxis.cpp @@ -80,7 +80,11 @@ void gXAxis::SetDay(Day* day) { if (!day) return; #if defined (FIX_FOR_DATE_MISMATCH) // between labels on graphs and system data, - startOfDay = QDateTime::fromMSecsSinceEpoch(day->first()).date().startOfDay().toMSecsSinceEpoch(); + #if QT_VERSION < QT_VERSION_CHECK(5,14,0) + startOfDay = QDateTime(QDateTime::fromMSecsSinceEpoch(day->first()).date()).toMSecsSinceEpoch(); + #else + startOfDay = QDateTime::fromMSecsSinceEpoch(day->first()).date().startOfDay().toMSecsSinceEpoch(); + #endif #endif }