From 3767f3a89410b1deaffe5b8b0c83f15c9c471033 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Fri, 8 Nov 2024 20:35:48 +0100 Subject: [PATCH] fixup! fix(build): Fix `-Wdeprecated-declarations` warnings for `QDateTime` --- src/preferences/dialog/dlgprefautodj.cpp | 7 +++++++ src/preferences/dialog/dlgprefautodjdlg.ui | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/preferences/dialog/dlgprefautodj.cpp b/src/preferences/dialog/dlgprefautodj.cpp index fc395950232..02a94aff400 100644 --- a/src/preferences/dialog/dlgprefautodj.cpp +++ b/src/preferences/dialog/dlgprefautodj.cpp @@ -28,6 +28,13 @@ DlgPrefAutoDJ::DlgPrefAutoDJ(QWidget* pParent, #endif this, &DlgPrefAutoDJ::slotToggleRequeueIgnore); + /// TODO: Once we require at least Qt 6.5, remove this `setTimeZone` call + /// and uncomment the corresponding declarations in the UI file instead. +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + RequeueIgnoreTimeEdit->setTimeZone(QTimeZone::LocalTime); +#else + RequeueIgnoreTimeEdit->setTimeSpec(Qt::LocalTime); +#endif RequeueIgnoreTimeEdit->setTime( QTime::fromString( m_pConfig->getValue( diff --git a/src/preferences/dialog/dlgprefautodjdlg.ui b/src/preferences/dialog/dlgprefautodjdlg.ui index 094ddc551a3..0f20cc088f9 100644 --- a/src/preferences/dialog/dlgprefautodjdlg.ui +++ b/src/preferences/dialog/dlgprefautodjdlg.ui @@ -121,9 +121,13 @@ hh:mm - + + 60