Fix various clazy warnings

This commit is contained in:
Jonas Kvinge
2021-03-21 04:47:11 +01:00
parent 20c1c1d4be
commit 78588d8cdf
92 changed files with 337 additions and 234 deletions

View File

@@ -195,15 +195,15 @@ bool InternetCollectionView::RestoreLevelFocus(const QModelIndex &parent) {
case CollectionItem::Type_Divider: {
QString text = model()->data(current, CollectionModel::Role_SortText).toString();
if (!last_selected_container_.isEmpty() && last_selected_container_ == text) {
emit expand(current);
expand(current);
setCurrentIndex(current);
return true;
}
else if (last_selected_path_.contains(text)) {
emit expand(current);
expand(current);
// If a selected container or song were not found, we've got into a wrong subtree (happens with "unknown" all the time)
if (!RestoreLevelFocus(current)) {
emit collapse(current);
collapse(current);
}
else {
return true;