game_list: Implement context menu for items in list
* Add a context menu with a "Open Save Data Location" action
This commit is contained in:
parent
351b5d23f4
commit
f50dcc88bf
3 changed files with 32 additions and 4 deletions
|
@ -71,10 +71,13 @@ class GameListItemPath : public GameListItem {
|
|||
public:
|
||||
static const int FullPathRole = Qt::UserRole + 1;
|
||||
static const int TitleRole = Qt::UserRole + 2;
|
||||
static const int ProgramIdRole = Qt::UserRole + 3;
|
||||
|
||||
GameListItemPath() : GameListItem() {}
|
||||
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data) : GameListItem() {
|
||||
GameListItemPath(const QString& game_path, const std::vector<u8>& smdh_data, u64 program_id)
|
||||
: GameListItem() {
|
||||
setData(game_path, FullPathRole);
|
||||
setData(qulonglong(program_id), ProgramIdRole);
|
||||
|
||||
if (!Loader::IsValidSMDH(smdh_data)) {
|
||||
// SMDH is not valid, set a default icon
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue