Skip to content

Commit

Permalink
fixup! fix(build): Fix -Wdeprecated-declarations warnings for `QDat…
Browse files Browse the repository at this point in the history
…eTime`
  • Loading branch information
Holzhaus committed Nov 8, 2024
1 parent 5b453a4 commit 3767f3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/preferences/dialog/dlgprefautodj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check failure on line 34 in src/preferences/dialog/dlgprefautodj.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 x64

incomplete type 'QTimeZone' named in nested name specifier

Check failure on line 34 in src/preferences/dialog/dlgprefautodj.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 x64

no member named 'setTimeZone' in 'QTimeEdit'; did you mean 'setTimeRange'?

Check failure on line 34 in src/preferences/dialog/dlgprefautodj.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 arm64

incomplete type 'QTimeZone' named in nested name specifier

Check failure on line 34 in src/preferences/dialog/dlgprefautodj.cpp

View workflow job for this annotation

GitHub Actions / macOS 12 arm64

no member named 'setTimeZone' in 'QTimeEdit'; did you mean 'setTimeRange'?

Check failure on line 34 in src/preferences/dialog/dlgprefautodj.cpp

View workflow job for this annotation

GitHub Actions / Windows 2019 (MSVC)

'setTimeZone': is not a member of 'QTimeEdit'
#else
RequeueIgnoreTimeEdit->setTimeSpec(Qt::LocalTime);
#endif
RequeueIgnoreTimeEdit->setTime(
QTime::fromString(
m_pConfig->getValue(
Expand Down
8 changes: 6 additions & 2 deletions src/preferences/dialog/dlgprefautodjdlg.ui
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,13 @@
<property name="displayFormat">
<string>hh:mm</string>
</property>
<property name="timeZone">
<!--
TODO: Enable this once we require at least Qt 6.5 and remove the
corresponding code from the C++ file.
-->
<!--<property name="timeZone">
<enum>QTimeZone::LocalTime</enum>
</property>
</property>-->
<property name="minimumSize">
<size>
<width>60</width>
Expand Down

0 comments on commit 3767f3a

Please sign in to comment.