Add default to switch
This commit is contained in:
parent
0291b78bfa
commit
03ecde8b83
|
@ -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;
|
||||
|
||||
|
|
|
@ -236,7 +236,11 @@ QVariant ContextAlbumsModel::data(const CollectionItem *item, int role) const {
|
|||
|
||||
case Role_SortText:
|
||||
return item->SortText();
|
||||
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
|
||||
}
|
||||
|
|
|
@ -123,6 +123,8 @@ QVariant RadioModel::data(const RadioItem *item, int role) const {
|
|||
if (service) return service->Donate();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue