mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 01:57:07 -07:00
Allow clearing of execution log and peer ban log
This commit is contained in:
parent
9c7807ded4
commit
3309706964
4 changed files with 16 additions and 0 deletions
|
@ -45,8 +45,11 @@ LogListWidget::LogListWidget(int max_lines, QWidget *parent) :
|
|||
setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
// Context menu
|
||||
QAction *copyAct = new QAction(IconProvider::instance()->getIcon("edit-copy"), tr("Copy"), this);
|
||||
QAction *clearAct = new QAction(IconProvider::instance()->getIcon("edit-clear"), tr("Clear"), this);
|
||||
connect(copyAct, SIGNAL(triggered()), SLOT(copySelection()));
|
||||
connect(clearAct, SIGNAL(triggered()), SLOT(clearLog()));
|
||||
addAction(copyAct);
|
||||
addAction(clearAct);
|
||||
setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
}
|
||||
|
||||
|
@ -87,3 +90,8 @@ void LogListWidget::copySelection()
|
|||
|
||||
QApplication::clipboard()->setText(strings.join("\n"));
|
||||
}
|
||||
|
||||
void LogListWidget::clearLog() {
|
||||
clear();
|
||||
emit logCleared();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue