mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
Qt: Add copy to clipboard for game data
This commit is contained in:
parent
d013524ea9
commit
79dd62cda2
1 changed files with 13 additions and 0 deletions
|
@ -21,6 +21,8 @@
|
|||
#include <QScrollBar>
|
||||
#include <QInputDialog>
|
||||
#include <QToolTip>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
|
||||
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
|
||||
|
||||
|
@ -639,6 +641,9 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
QAction* downloadCompat = myMenu.addAction(tr("&Download Compatibility Database"));
|
||||
myMenu.addSeparator();
|
||||
QAction* editNotes = myMenu.addAction(tr("&Edit Tooltip Notes"));
|
||||
QMenu* infoMenu = myMenu.addMenu(tr("&Copy Info"));
|
||||
QAction* copyName = infoMenu->addAction(tr("&Copy Name"));
|
||||
QAction* copySerial = infoMenu->addAction(tr("&Copy Serial"));
|
||||
|
||||
const std::string config_base_dir = fs::get_config_dir() + "data/" + currGame.serial;
|
||||
|
||||
|
@ -749,6 +754,14 @@ void game_list_frame::ShowContextMenu(const QPoint &pos)
|
|||
Refresh();
|
||||
}
|
||||
});
|
||||
connect(copyName, &QAction::triggered, [=]
|
||||
{
|
||||
QApplication::clipboard()->setText(name);
|
||||
});
|
||||
connect(copySerial, &QAction::triggered, [=]
|
||||
{
|
||||
QApplication::clipboard()->setText(serial);
|
||||
});
|
||||
|
||||
//Disable options depending on software category
|
||||
QString category = qstr(currGame.category);
|
||||
|
|
Loading…
Add table
Reference in a new issue