mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
Qt: add possibility to copy 'Name [Serial]'
This commit is contained in:
parent
27a94308a7
commit
4419e5d838
@ -641,9 +641,10 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||||||
QAction* downloadCompat = myMenu.addAction(tr("&Download Compatibility Database"));
|
QAction* downloadCompat = myMenu.addAction(tr("&Download Compatibility Database"));
|
||||||
myMenu.addSeparator();
|
myMenu.addSeparator();
|
||||||
QAction* editNotes = myMenu.addAction(tr("&Edit Tooltip Notes"));
|
QAction* editNotes = myMenu.addAction(tr("&Edit Tooltip Notes"));
|
||||||
QMenu* infoMenu = myMenu.addMenu(tr("&Copy Info"));
|
QMenu* info_menu = myMenu.addMenu(tr("&Copy Info"));
|
||||||
QAction* copyName = infoMenu->addAction(tr("&Copy Name"));
|
QAction* copy_info = info_menu->addAction(tr("&Copy Name + Serial"));
|
||||||
QAction* copySerial = infoMenu->addAction(tr("&Copy Serial"));
|
QAction* copy_name = info_menu->addAction(tr("&Copy Name"));
|
||||||
|
QAction* copy_serial = info_menu->addAction(tr("&Copy Serial"));
|
||||||
|
|
||||||
const std::string config_base_dir = fs::get_config_dir() + "data/" + currGame.serial;
|
const std::string config_base_dir = fs::get_config_dir() + "data/" + currGame.serial;
|
||||||
|
|
||||||
@ -754,11 +755,15 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(copyName, &QAction::triggered, [=]
|
connect(copy_info, &QAction::triggered, [=]
|
||||||
|
{
|
||||||
|
QApplication::clipboard()->setText(name + " [" + serial + "]");
|
||||||
|
});
|
||||||
|
connect(copy_name, &QAction::triggered, [=]
|
||||||
{
|
{
|
||||||
QApplication::clipboard()->setText(name);
|
QApplication::clipboard()->setText(name);
|
||||||
});
|
});
|
||||||
connect(copySerial, &QAction::triggered, [=]
|
connect(copy_serial, &QAction::triggered, [=]
|
||||||
{
|
{
|
||||||
QApplication::clipboard()->setText(serial);
|
QApplication::clipboard()->setText(serial);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user