From: Steve Lhomme Date: Tue, 17 Dec 2024 08:39:26 +0000 (+0100) Subject: qt: use std::sort instead of deprecated qSort() X-Git-Tag: archive/raspbian/3.0.21-7+rpi1^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5c0bf6e9ba14466f7fceae058919feb7e751c776;p=vlc.git qt: use std::sort instead of deprecated qSort() Similar to c49140dcff3a2ba2729cec8756c7f78b198d50c9. Gbp-Pq: Name 0123-qt-use-std-sort-instead-of-deprecated-qSort.patch --- diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp index a6bdd1f8..5b24a0f9 100644 --- a/modules/gui/qt/components/playlist/playlist_model.cpp +++ b/modules/gui/qt/components/playlist/playlist_model.cpp @@ -126,7 +126,7 @@ QMimeData *PLModel::mimeData( const QModelIndexList &indexes ) const list.append(index); } - qSort(list.begin(), list.end(), modelIndexLessThen); + std::sort(list.begin(), list.end(), modelIndexLessThen); AbstractPLItem *item = NULL; foreach( const QModelIndex &index, list ) { diff --git a/modules/gui/qt/dialogs/bookmarks.cpp b/modules/gui/qt/dialogs/bookmarks.cpp index 186b4d5d..4282a3e6 100644 --- a/modules/gui/qt/dialogs/bookmarks.cpp +++ b/modules/gui/qt/dialogs/bookmarks.cpp @@ -186,7 +186,7 @@ void BookmarksDialog::del() b_ignore_updates = true; /* Sort needed to make sure that selected elements are deleted in descending order, otherwise the indexes might change and wrong bookmarks are deleted. */ - qSort( selected.begin(), selected.end() ); + std::sort( selected.begin(), selected.end() ); QModelIndexList::Iterator it = selected.end(); for( --it; it != selected.begin(); it-- ) {