chore: use std::as_const() instead of qAsConst

Waring: constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead. [-Wdeprecated-declarations]
This commit is contained in:
rewine
2023-11-25 02:18:37 +08:00
parent 19de914046
commit 2d718b013b
2 changed files with 3 additions and 1 deletions

View File

@ -164,7 +164,7 @@ std::tuple<int, QUrl> PlaylistManager::currentFileUrl() const
QList<QUrl> PlaylistManager::convertToUrlList(const QStringList &files)
{
QList<QUrl> urlList;
for (const QString & str : qAsConst(files)) {
for (const QString & str : std::as_const(files)) {
QUrl url = QUrl::fromLocalFile(str);
if (url.isValid()) {
urlList.append(url);