mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Fix implicit fallthrough
Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
110d1a8fcf
commit
eda4592f19
5 changed files with 18 additions and 17 deletions
|
|
@ -67,22 +67,22 @@ QVariant ResourcePackFolderModel::data(const QModelIndex& index, int role) const
|
|||
switch (role) {
|
||||
case Qt::BackgroundRole:
|
||||
return rowBackground(row);
|
||||
case Qt::DisplayRole:
|
||||
switch (column) {
|
||||
case PackFormatColumn: {
|
||||
auto& resource = at(row);
|
||||
auto pack_format = resource.packFormat();
|
||||
if (pack_format == 0)
|
||||
return tr("Unrecognized");
|
||||
case Qt::DisplayRole: {
|
||||
if (column == PackFormatColumn) {
|
||||
auto& resource = at(row);
|
||||
auto pack_format = resource.packFormat();
|
||||
if (pack_format == 0)
|
||||
return tr("Unrecognized");
|
||||
|
||||
auto version_bounds = resource.compatibleVersions();
|
||||
if (version_bounds.first.toString().isEmpty())
|
||||
return QString::number(pack_format);
|
||||
auto version_bounds = resource.compatibleVersions();
|
||||
if (version_bounds.first.toString().isEmpty())
|
||||
return QString::number(pack_format);
|
||||
|
||||
return QString("%1 (%2 - %3)")
|
||||
.arg(QString::number(pack_format), version_bounds.first.toString(), version_bounds.second.toString());
|
||||
}
|
||||
return QString("%1 (%2 - %3)")
|
||||
.arg(QString::number(pack_format), version_bounds.first.toString(), version_bounds.second.toString());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case Qt::DecorationRole: {
|
||||
if (column == ImageColumn) {
|
||||
return at(row).image({ 32, 32 }, Qt::AspectRatioMode::KeepAspectRatioByExpanding);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue