Add default to switch

This commit is contained in:
Jonas Kvinge 2021-10-30 01:08:16 +02:00
parent 0291b78bfa
commit 03ecde8b83
4 changed files with 13 additions and 0 deletions

View File

@ -808,7 +808,10 @@ QVariant CollectionModel::data(const CollectionItem *item, const int role) const
case Role_SortText:
return item->SortText();
default:
return QVariant();
}
return QVariant();
}
@ -1871,6 +1874,7 @@ const CollectionModel::GroupBy &CollectionModel::Grouping::operator[](const int
case 0: return first;
case 1: return second;
case 2: return third;
default: break;
}
qLog(Error) << "CollectionModel::Grouping[] index out of range" << i;
return first;
@ -1883,6 +1887,7 @@ CollectionModel::GroupBy &CollectionModel::Grouping::operator[](const int i) {
case 0: return first;
case 1: return second;
case 2: return third;
default: break;
}
qLog(Error) << "CollectionModel::Grouping[] index out of range" << i;

View File

@ -236,7 +236,11 @@ QVariant ContextAlbumsModel::data(const CollectionItem *item, int role) const {
case Role_SortText:
return item->SortText();
default:
return QVariant();
}
return QVariant();
}

View File

@ -123,6 +123,8 @@ QVariant RadioModel::data(const RadioItem *item, int role) const {
if (service) return service->Donate();
break;
}
default:
return QVariant();
}
return QVariant();

View File

@ -282,6 +282,8 @@ QVariant SmartPlaylistsModel::data(const QModelIndex &idx, const int role) const
case Qt::DisplayRole:
case Qt::ToolTipRole:
return item->DisplayText();
default:
return QVariant();
}
return QVariant();