From 5c0bf6e9ba14466f7fceae058919feb7e751c776 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 17 Dec 2024 09:39:26 +0100 Subject: [PATCH] qt: use std::sort instead of deprecated qSort() Similar to c49140dcff3a2ba2729cec8756c7f78b198d50c9. Gbp-Pq: Name 0123-qt-use-std-sort-instead-of-deprecated-qSort.patch --- modules/gui/qt/components/playlist/playlist_model.cpp | 2 +- modules/gui/qt/dialogs/bookmarks.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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-- ) { -- 2.30.2