diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-05-27 14:33:37 +0200 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-05-28 12:26:26 +0200 |
commit | 3f6f5b6169657f2b77f553024b6e4e33cbd119ae (patch) | |
tree | bc0ac7e5eb6e488efcac5e9388a644a230d5dd5d /src/widget/wtracktableview.cpp | |
parent | df66e41e4486753e55293d4177b4a0862bdeb3ff (diff) |
Replace deprecated QLinkedList with std::list
Diffstat (limited to 'src/widget/wtracktableview.cpp')
-rw-r--r-- | src/widget/wtracktableview.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/widget/wtracktableview.cpp b/src/widget/wtracktableview.cpp index 057b312932..794c9f0e4f 100644 --- a/src/widget/wtracktableview.cpp +++ b/src/widget/wtracktableview.cpp @@ -1,7 +1,6 @@ #include "widget/wtracktableview.h" #include <QDrag> -#include <QLinkedList> #include <QModelIndex> #include <QScrollBar> #include <QShortcut> @@ -812,12 +811,11 @@ void WTrackTableView::setSelectedTracks(const QList<TrackId>& trackIds) { } for (const auto& trackId : trackIds) { - const QLinkedList<int> gts = pTrackModel->getTrackRows(trackId); + const std::list<int> gts = pTrackModel->getTrackRows(trackId); - QLinkedList<int>::const_iterator i; - for (i = gts.constBegin(); i != gts.constEnd(); ++i) { - pSelectionModel->select(model()->index(*i, 0), - QItemSelectionModel::Select | QItemSelectionModel::Rows); + for (int trackRow : gts) { + pSelectionModel->select(model()->index(trackRow, 0), + QItemSelectionModel::Select | QItemSelectionModel::Rows); } } } @@ -868,7 +866,7 @@ void WTrackTableView::doSortByColumn(int headerSection, Qt::SortOrder sortOrder) // the TrackModel. This will allow the playlist table model to use the // table index as the unique id instead of this code stupidly using // trackid. - QLinkedList<int> rows = trackModel->getTrackRows(trackId); + std::list<int> rows = trackModel->getTrackRows(trackId); for (int row : rows) { // Restore sort order by rows, so the following commands will act as expected selectedRows.insert(row, 0); |