qt: Add option to uninstall a game. (#7064)

* qt: Add option to uninstall a game.

* Address review comments.
This commit is contained in:
Steveice10 2023-10-14 18:11:59 -07:00 committed by GitHub
parent 3d55270de6
commit 07839fb3ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 223 additions and 46 deletions

View file

@ -25,6 +25,10 @@
#include "common/string_util.h"
#include "core/loader/smdh.h"
namespace Service::FS {
enum class MediaType : u32;
}
enum class GameListItemType {
Game = QStandardItem::UserType + 1,
CustomDir = QStandardItem::UserType + 2,
@ -153,14 +157,16 @@ public:
static constexpr int ProgramIdRole = SortRole + 3;
static constexpr int ExtdataIdRole = SortRole + 4;
static constexpr int LongTitleRole = SortRole + 5;
static constexpr int MediaTypeRole = SortRole + 6;
GameListItemPath() = default;
GameListItemPath(const QString& game_path, std::span<const u8> smdh_data, u64 program_id,
u64 extdata_id) {
u64 extdata_id, Service::FS::MediaType media_type) {
setData(type(), TypeRole);
setData(game_path, FullPathRole);
setData(qulonglong(program_id), ProgramIdRole);
setData(qulonglong(extdata_id), ExtdataIdRole);
setData(quint32(media_type), MediaTypeRole);
if (UISettings::values.game_list_icon_size.GetValue() ==
UISettings::GameListIconSize::NoIcon) {