Skip to content

medialib: use std::as_const instead of qAsConst

std::as_const is available starting with C++171. qAsConst is now deprecated:

../../../../modules/gui/qt/medialibrary/medialib.cpp: In lambda function:
../../../../modules/gui/qt/medialibrary/medialib.cpp:357:39: warning: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<QJSValue>; typename std::add_const<_Tp>::type = const QList<QJSValue>]’ is deprecated: Use std::as_const() instead. [-Wdeprecated-declarations]
  357 |         for (const auto& cb : qAsConst(it.value()))
      |                               ~~~~~~~~^~~~~~~~~~~~
  1. https://en.cppreference.com/w/cpp/utility/as_const

Merge request reports

Loading