mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
Merge pull request #1183 from flylai/dev-log-copy-selected
feat: support copying selected logs
This commit is contained in:
commit
88a2b51da3
@ -192,6 +192,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), QvStateObject("Ma
|
||||
//
|
||||
// Actions for right click the log text browser
|
||||
//
|
||||
logRCM_Menu->addAction(action_RCM_CopySelected);
|
||||
logRCM_Menu->addAction(action_RCM_CopyRecentLogs);
|
||||
logRCM_Menu->addSeparator();
|
||||
logRCM_Menu->addAction(action_RCM_SwitchCoreLog);
|
||||
@ -200,6 +201,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), QvStateObject("Ma
|
||||
connect(action_RCM_SwitchCoreLog, &QAction::triggered, [this] { masterLogBrowser->setDocument(vCoreLogDocument); });
|
||||
connect(action_RCM_SwitchQv2rayLog, &QAction::triggered, [this] { masterLogBrowser->setDocument(qvLogDocument); });
|
||||
connect(action_RCM_CopyRecentLogs, &QAction::triggered, this, &MainWindow::Action_CopyRecentLogs);
|
||||
connect(action_RCM_CopySelected, &QAction::triggered, masterLogBrowser, &QTextBrowser::copy);
|
||||
//
|
||||
speedChartWidget->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(speedChartWidget, &QWidget::customContextMenuRequested, [this](const QPoint &) { graphWidgetMenu->popup(QCursor::pos()); });
|
||||
|
@ -151,6 +151,7 @@ class MainWindow
|
||||
DECL_ACTION(logRCM_Menu, action_RCM_SwitchCoreLog);
|
||||
DECL_ACTION(logRCM_Menu, action_RCM_SwitchQv2rayLog);
|
||||
DECL_ACTION(logRCM_Menu, action_RCM_CopyRecentLogs);
|
||||
DECL_ACTION(logRCM_Menu, action_RCM_CopySelected);
|
||||
#undef DECL_ACTION
|
||||
|
||||
QTextDocument *vCoreLogDocument = new QTextDocument(this);
|
||||
|
@ -233,4 +233,5 @@ void MainWindow::UpdateActionTranslations()
|
||||
//
|
||||
action_RCM_CopyGraph->setText(tr("Copy graph as image."));
|
||||
action_RCM_CopyRecentLogs->setText(tr("Copy latest logs."));
|
||||
action_RCM_CopySelected->setText(tr("Copy selected."));
|
||||
}
|
||||
|
@ -1080,6 +1080,10 @@ This entry is ignored by V2Ray core when using DoH servers.</source>
|
||||
<source>Removing Connection</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy selected.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>OutboundEditor</name>
|
||||
|
Loading…
Reference in New Issue
Block a user