mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-01-28 16:20:26 +01:00
Replace QModelIndex child() with index()
This commit is contained in:
parent
cc3d454d60
commit
beeba88ea5
@ -290,10 +290,9 @@ void InternetSearchModel::GetChildResults(const QStandardItem *item, InternetSea
|
||||
if (item->rowCount()) {
|
||||
const QModelIndex parent_proxy_index = proxy_->mapFromSource(item->index());
|
||||
|
||||
// Yes - visit all the children, but do so through the proxy so we get them
|
||||
// in the right order.
|
||||
// Yes - visit all the children, but do so through the proxy so we get them in the right order.
|
||||
for (int i = 0; i < item->rowCount(); ++i) {
|
||||
const QModelIndex proxy_index = parent_proxy_index.child(i, 0);
|
||||
const QModelIndex proxy_index = index(i, 0, parent_proxy_index);
|
||||
const QModelIndex index = proxy_->mapToSource(proxy_index);
|
||||
GetChildResults(itemFromIndex(index), results, visited);
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ void PlaylistListContainer::RecursivelyFindPlaylists(const QModelIndex &parent,
|
||||
|
||||
case PlaylistListModel::Type_Folder:
|
||||
for (int i = 0; i < parent.model()->rowCount(parent); ++i) {
|
||||
RecursivelyFindPlaylists(parent.child(i, 0), ids);
|
||||
RecursivelyFindPlaylists(proxy_->index(i, 0, parent), ids);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user