1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-14 00:37:58 +00:00

Set "enter" as shortcut to download the selected torrents in search job

This commit is contained in:
thalieht 2018-07-29 15:24:12 +03:00
parent e59841d35c
commit c55daeec38

View File

@ -151,6 +151,9 @@ SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent)
connect(searchHandler, &SearchHandler::searchFinished, this, &SearchJobWidget::searchFinished); connect(searchHandler, &SearchHandler::searchFinished, this, &SearchJobWidget::searchFinished);
connect(searchHandler, &SearchHandler::searchFailed, this, &SearchJobWidget::searchFailed); connect(searchHandler, &SearchHandler::searchFailed, this, &SearchJobWidget::searchFailed);
connect(this, &QObject::destroyed, searchHandler, &QObject::deleteLater); connect(this, &QObject::destroyed, searchHandler, &QObject::deleteLater);
QShortcut *enterHotkey = new QShortcut(Qt::Key_Return, m_ui->resultsBrowser, nullptr, nullptr, Qt::WidgetShortcut);
connect(enterHotkey, &QShortcut::activated, this, &SearchJobWidget::downloadTorrents);
} }
SearchJobWidget::~SearchJobWidget() SearchJobWidget::~SearchJobWidget()