diff --git a/rpcs3/rpcs3qt/log_viewer.cpp b/rpcs3/rpcs3qt/log_viewer.cpp index 27f326eb24..cd003f6ed2 100644 --- a/rpcs3/rpcs3qt/log_viewer.cpp +++ b/rpcs3/rpcs3qt/log_viewer.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -61,6 +62,7 @@ void log_viewer::show_context_menu(const QPoint& pos) { QMenu menu; QAction* clear = new QAction(tr("&Clear")); + QAction* copy = new QAction(tr("&Copy")); QAction* open = new QAction(tr("&Open log file")); QAction* save = new QAction(tr("&Save filtered log")); QAction* filter = new QAction(tr("&Filter log")); @@ -110,6 +112,8 @@ void log_viewer::show_context_menu(const QPoint& pos) init_action(notice_act, logs::level::notice); init_action(trace_act, logs::level::trace); + menu.addAction(copy); + menu.addSeparator(); menu.addAction(open); menu.addSeparator(); menu.addAction(save); @@ -128,6 +132,11 @@ void log_viewer::show_context_menu(const QPoint& pos) menu.addSeparator(); menu.addAction(clear); + connect(copy, &QAction::triggered, this, [this]() + { + m_log_text->copy(); + }); + connect(clear, &QAction::triggered, this, [this]() { m_log_text->clear();