From 49c145e603d0fb2449eaa3da03c172c714ad5888 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Mon, 18 Aug 2025 22:05:12 +0200 Subject: [PATCH] Fix compilation on Qt 5.12 --- .github/format/AStyleHelper.exe.config | 2 +- src/gui/Src/Gui/MainWindow.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/format/AStyleHelper.exe.config b/.github/format/AStyleHelper.exe.config index e28fe599..97036a24 100644 --- a/.github/format/AStyleHelper.exe.config +++ b/.github/format/AStyleHelper.exe.config @@ -15,7 +15,7 @@ style=allman, convert-tabs, align-pointer=type, align-reference=middle, indent=spaces, indent-namespaces, indent-col1-comments, pad-oper, unpad-paren, keep-one-line-blocks, close-templates - src/cross/vendor + src/cross/vendor;src/gui/Src/ThirdPartyLibs/md4c diff --git a/src/gui/Src/Gui/MainWindow.cpp b/src/gui/Src/Gui/MainWindow.cpp index 89542339..c95ae87c 100644 --- a/src/gui/Src/Gui/MainWindow.cpp +++ b/src/gui/Src/Gui/MainWindow.cpp @@ -1065,7 +1065,9 @@ void MainWindow::loadWindowSettings() } #ifdef X64DBG_RELEASE - auto compileEpoch = GetCompileDate().startOfDay(Qt::UTC).toSecsSinceEpoch(); + auto compileDate = QDateTime(GetCompileDate()); + compileDate.setTimeSpec(Qt::UTC); + auto compileEpoch = compileDate.toSecsSinceEpoch(); duint releaseNotesEpoch = 0; BridgeSettingGetUint("Gui", "ReleaseNotesEpoch", &releaseNotesEpoch); if(releaseNotesEpoch < compileEpoch) @@ -1231,8 +1233,9 @@ void MainWindow::showReleaseNotes(duint cutoffEpoch) { QRegularExpressionMatch match = i.next(); auto matchText = match.captured(1); - auto matchDate = QDate::fromString(matchText, "yyyy.MM.dd"); - auto matchEpoch = matchDate.startOfDay(Qt::UTC).toSecsSinceEpoch(); + auto matchDate = QDateTime::fromString(matchText, "yyyy.MM.dd"); + matchDate.setTimeSpec(Qt::UTC); + auto matchEpoch = matchDate.toSecsSinceEpoch(); if(matchEpoch <= cutoffEpoch) { markdown = markdown.left(match.capturedStart(0));