yuzu/game_list: Silence -Wswitch
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
This commit is contained in:
parent
5d1d0b3693
commit
5e98835b5f
2 changed files with 12 additions and 3 deletions
|
@ -258,6 +258,8 @@ void GameList::onUpdateThemedIcons() {
|
||||||
case GameListItemType::AddDir:
|
case GameListItemType::AddDir:
|
||||||
child->setData(QIcon::fromTheme("plus").pixmap(48), Qt::DecorationRole);
|
child->setData(QIcon::fromTheme("plus").pixmap(48), Qt::DecorationRole);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,6 +373,8 @@ void GameList::ValidateEntry(const QModelIndex& item) {
|
||||||
case GameListItemType::AddDir:
|
case GameListItemType::AddDir:
|
||||||
emit AddDirectory();
|
emit AddDirectory();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,6 +446,8 @@ void GameList::PopupContextMenu(const QPoint& menu_location) {
|
||||||
case GameListItemType::SystemDir:
|
case GameListItemType::SystemDir:
|
||||||
AddPermDirPopup(context_menu, selected);
|
AddPermDirPopup(context_menu, selected);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
context_menu.exec(tree_view->viewport()->mapToGlobal(menu_location));
|
context_menu.exec(tree_view->viewport()->mapToGlobal(menu_location));
|
||||||
}
|
}
|
||||||
|
|
|
@ -361,14 +361,17 @@ public:
|
||||||
setData(QIcon::fromTheme(QStringLiteral("chip")).pixmap(icon_size), Qt::DecorationRole);
|
setData(QIcon::fromTheme(QStringLiteral("chip")).pixmap(icon_size), Qt::DecorationRole);
|
||||||
setData(QObject::tr("System Titles"), Qt::DisplayRole);
|
setData(QObject::tr("System Titles"), Qt::DisplayRole);
|
||||||
break;
|
break;
|
||||||
case GameListItemType::CustomDir:
|
case GameListItemType::CustomDir: {
|
||||||
QString icon_name = QFileInfo::exists(game_dir->path) ? QStringLiteral("folder")
|
QString icon_name = QFileInfo::exists(game_dir->path) ? QStringLiteral("folder")
|
||||||
: QStringLiteral("bad_folder");
|
: QStringLiteral("bad_folder");
|
||||||
setData(QIcon::fromTheme(icon_name).pixmap(icon_size), Qt::DecorationRole);
|
setData(QIcon::fromTheme(icon_name).pixmap(icon_size), Qt::DecorationRole);
|
||||||
setData(game_dir->path, Qt::DisplayRole);
|
setData(game_dir->path, Qt::DisplayRole);
|
||||||
break;
|
break;
|
||||||
};
|
}
|
||||||
};
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int type() const override {
|
int type() const override {
|
||||||
return static_cast<int>(dir_type);
|
return static_cast<int>(dir_type);
|
||||||
|
|
Loading…
Reference in a new issue