|
|
|
@ -33,6 +33,7 @@
@@ -33,6 +33,7 @@
|
|
|
|
|
#include <QClipboard> |
|
|
|
|
#include <QDesktopServices> |
|
|
|
|
#include <QHeaderView> |
|
|
|
|
#include <QKeyEvent> |
|
|
|
|
#include <QMenu> |
|
|
|
|
#include <QPalette> |
|
|
|
|
#include <QStandardItemModel> |
|
|
|
@ -160,9 +161,6 @@ SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent)
@@ -160,9 +161,6 @@ SearchJobWidget::SearchJobWidget(SearchHandler *searchHandler, QWidget *parent)
|
|
|
|
|
connect(searchHandler, &SearchHandler::searchFailed, this, &SearchJobWidget::searchFailed); |
|
|
|
|
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); |
|
|
|
|
|
|
|
|
|
setStatusTip(statusText(m_status)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -479,3 +477,15 @@ CachedSettingValue<SearchJobWidget::NameFilteringMode> &SearchJobWidget::nameFil
@@ -479,3 +477,15 @@ CachedSettingValue<SearchJobWidget::NameFilteringMode> &SearchJobWidget::nameFil
|
|
|
|
|
static CachedSettingValue<NameFilteringMode> setting("Search/FilteringMode", NameFilteringMode::OnlyNames); |
|
|
|
|
return setting; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void SearchJobWidget::keyPressEvent(QKeyEvent *event) |
|
|
|
|
{ |
|
|
|
|
switch (event->key()) { |
|
|
|
|
case Qt::Key_Enter: |
|
|
|
|
case Qt::Key_Return: |
|
|
|
|
downloadTorrents(); |
|
|
|
|
break; |
|
|
|
|
default: |
|
|
|
|
QWidget::keyPressEvent(event); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|