mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-01 10:06:43 +01:00
Change lambda capture
This commit is contained in:
parent
59e11d6caa
commit
d4f10c61ef
@ -591,7 +591,7 @@ void CollectionModel::SongsDeleted(const SongList &songs) {
|
|||||||
|
|
||||||
// Look to see if there are any other items still under this divider
|
// Look to see if there are any other items still under this divider
|
||||||
QList<CollectionItem*> container_nodes = container_nodes_[0].values();
|
QList<CollectionItem*> container_nodes = container_nodes_[0].values();
|
||||||
if (std::any_of(container_nodes.begin(), container_nodes.end(), [=](CollectionItem *node){ return DividerKey(group_by_[0], node) == divider_key; })) {
|
if (std::any_of(container_nodes.begin(), container_nodes.end(), [this, divider_key](CollectionItem *node){ return DividerKey(group_by_[0], node) == divider_key; })) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -786,7 +786,7 @@ QVariant CollectionModel::data(const CollectionItem *item, const int role) const
|
|||||||
if (item->children.isEmpty()) {
|
if (item->children.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (std::any_of(item->children.begin(), item->children.end(), [=](CollectionItem *child) { return !data(child, role).toBool(); })) {
|
else if (std::any_of(item->children.begin(), item->children.end(), [this, role](CollectionItem *child) { return !data(child, role).toBool(); })) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -519,7 +519,7 @@ bool EditTagDialog::DoesValueVary(const QModelIndexList &sel, const QString &id)
|
|||||||
|
|
||||||
bool EditTagDialog::IsValueModified(const QModelIndexList &sel, const QString &id) const {
|
bool EditTagDialog::IsValueModified(const QModelIndexList &sel, const QString &id) const {
|
||||||
|
|
||||||
if (std::any_of(sel.begin(), sel.end(), [=](const QModelIndex &i){ return data_[i.row()].original_value(id) != data_[i.row()].current_value(id); })) {
|
if (std::any_of(sel.begin(), sel.end(), [this, id](const QModelIndex &i){ return data_[i.row()].original_value(id) != data_[i.row()].current_value(id); })) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user