|
|
|
@ -253,10 +253,12 @@ MainWindow::MainWindow(QWidget *parent)
@@ -253,10 +253,12 @@ MainWindow::MainWindow(QWidget *parent)
|
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackersRemoved, m_transferListFiltersWidget, &TransferListFiltersWidget::removeTrackers); |
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackerlessStateChanged, m_transferListFiltersWidget, &TransferListFiltersWidget::changeTrackerless); |
|
|
|
|
|
|
|
|
|
using Func = void (TransferListFiltersWidget::*)(BitTorrent::TorrentHandle *const, const QString &); |
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackerSuccess, m_transferListFiltersWidget, static_cast<Func>(&TransferListFiltersWidget::trackerSuccess)); |
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackerError, m_transferListFiltersWidget, static_cast<Func>(&TransferListFiltersWidget::trackerError)); |
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackerWarning, m_transferListFiltersWidget, static_cast<Func>(&TransferListFiltersWidget::trackerWarning)); |
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackerSuccess |
|
|
|
|
, m_transferListFiltersWidget, qOverload<BitTorrent::TorrentHandle *const, const QString &>(&TransferListFiltersWidget::trackerSuccess)); |
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackerError |
|
|
|
|
, m_transferListFiltersWidget, qOverload<BitTorrent::TorrentHandle *const, const QString &>(&TransferListFiltersWidget::trackerError)); |
|
|
|
|
connect(BitTorrent::Session::instance(), &BitTorrent::Session::trackerWarning |
|
|
|
|
, m_transferListFiltersWidget, qOverload<BitTorrent::TorrentHandle *const, const QString &>(&TransferListFiltersWidget::trackerWarning)); |
|
|
|
|
|
|
|
|
|
#ifdef Q_OS_MAC |
|
|
|
|
// Increase top spacing to avoid tab overlapping
|
|
|
|
@ -856,17 +858,15 @@ void MainWindow::createKeyboardShortcuts()
@@ -856,17 +858,15 @@ void MainWindow::createKeyboardShortcuts()
|
|
|
|
|
m_ui->actionCloseWindow->setVisible(false); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
QShortcut *switchTransferShortcut = new QShortcut(Qt::ALT + Qt::Key_1, this); |
|
|
|
|
const auto *switchTransferShortcut = new QShortcut(Qt::ALT + Qt::Key_1, this); |
|
|
|
|
connect(switchTransferShortcut, &QShortcut::activated, this, &MainWindow::displayTransferTab); |
|
|
|
|
|
|
|
|
|
using Func = void (MainWindow::*)(); |
|
|
|
|
QShortcut *switchSearchShortcut = new QShortcut(Qt::ALT + Qt::Key_2, this); |
|
|
|
|
connect(switchSearchShortcut, &QShortcut::activated, this, static_cast<Func>(&MainWindow::displaySearchTab)); |
|
|
|
|
QShortcut *switchRSSShortcut = new QShortcut(Qt::ALT + Qt::Key_3, this); |
|
|
|
|
connect(switchRSSShortcut, &QShortcut::activated, this, static_cast<Func>(&MainWindow::displayRSSTab)); |
|
|
|
|
QShortcut *switchExecutionLogShortcut = new QShortcut(Qt::ALT + Qt::Key_4, this); |
|
|
|
|
const auto *switchSearchShortcut = new QShortcut(Qt::ALT + Qt::Key_2, this); |
|
|
|
|
connect(switchSearchShortcut, &QShortcut::activated, this, qOverload<>(&MainWindow::displaySearchTab)); |
|
|
|
|
const auto *switchRSSShortcut = new QShortcut(Qt::ALT + Qt::Key_3, this); |
|
|
|
|
connect(switchRSSShortcut, &QShortcut::activated, this, qOverload<>(&MainWindow::displayRSSTab)); |
|
|
|
|
const auto *switchExecutionLogShortcut = new QShortcut(Qt::ALT + Qt::Key_4, this); |
|
|
|
|
connect(switchExecutionLogShortcut, &QShortcut::activated, this, &MainWindow::displayExecutionLogTab); |
|
|
|
|
QShortcut *switchSearchFilterShortcut = new QShortcut(QKeySequence::Find, m_transferListWidget); |
|
|
|
|
const auto *switchSearchFilterShortcut = new QShortcut(QKeySequence::Find, m_transferListWidget); |
|
|
|
|
connect(switchSearchFilterShortcut, &QShortcut::activated, this, &MainWindow::focusSearchFilter); |
|
|
|
|
|
|
|
|
|
m_ui->actionDocumentation->setShortcut(QKeySequence::HelpContents); |
|
|
|
|