Skip to content

qt: remove deprecated timespec

Steve Lhomme requested to merge robUx4/vlc:qt6-cleanups into master

Will be gone in 6.10. The replacement Timezone was added in 6.7. And we don't need to set it unless the display format uses a timezone [1] + [2].

This avoids this kind of warnings:

./gui/qt/ui/open.h:205:27: warning: 'setTimeSpec' is deprecated: Use setTimeZone() instead [-Wdeprecated-declarations]
  205 |         stopTimeTimeEdit->setTimeSpec(Qt::LocalTime);
      |                           ^
/mnt/s/sources/build/win64-llvm18/contrib/x86_64-w64-mingw32ucrt/include/QtWidgets/qdatetimeedit.h:134:5: note: 'setTimeSpec' has been explicitly marked deprecated here
  134 |     QT_DEPRECATED_VERSION_X_6_10("Use setTimeZone() instead")
      |     ^
/mnt/s/sources/build/win64-llvm18/contrib/x86_64-w64-mingw32ucrt/include/QtCore/qtdeprecationmarkers.h:187:45: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_10'
  187 | # define QT_DEPRECATED_VERSION_X_6_10(text) QT_DEPRECATED_X(text)
      |                                             ^
/mnt/s/sources/build/win64-llvm18/contrib/x86_64-w64-mingw32ucrt/include/QtCore/qtdeprecationmarkers.h:29:33: note: expanded from macro 'QT_DEPRECATED_X'
   29 | #  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
      |                                 ^
/mnt/s/sources/build/win64-llvm18/contrib/x86_64-w64-mingw32ucrt/include/QtCore/qcompilerdetection.h:1000:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
 1000 | #  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
      |                                    ^

[1] https://doc.qt.io/qt-6/qdatetimeedit.html#timeZone-prop [2] https://doc.qt.io/qt-6/qtime.html#toString

Merge request reports

Loading