qt: use std::sort instead of deprecated qSort()
authorSteve Lhomme <robux4@ycbcr.xyz>
Tue, 17 Dec 2024 08:39:26 +0000 (09:39 +0100)
committerSebastian Ramacher <sramacher@debian.org>
Tue, 21 Jan 2025 18:02:47 +0000 (19:02 +0100)
Similar to c49140dcff3a2ba2729cec8756c7f78b198d50c9.

Gbp-Pq: Name 0123-qt-use-std-sort-instead-of-deprecated-qSort.patch

modules/gui/qt/components/playlist/playlist_model.cpp
modules/gui/qt/dialogs/bookmarks.cpp

index a6bdd1f8e40f6fcb2c5839f418a2341d53dd6fe3..5b24a0f9afa99d19a534a7f99486387c68fd4d4e 100644 (file)
@@ -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 ) {
index 186b4d5d3c7df0d3090fe01c5f758b1a29252be4..4282a3e6e541b77f67bf75c38ced96e67af6839e 100644 (file)
@@ -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-- )
         {