mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 22:20:53 +03:00
Merge pull request #7563 from Chocobo1/delkey
Fix delete key has no effect due to "Ambiguous shortcut overload"
This commit is contained in:
commit
2977ba9ec2
3 changed files with 3 additions and 0 deletions
|
@ -840,6 +840,7 @@ void MainWindow::createKeyboardShortcuts()
|
|||
m_ui->actionCreateTorrent->setShortcut(QKeySequence::New);
|
||||
m_ui->actionOpen->setShortcut(QKeySequence::Open);
|
||||
m_ui->actionDelete->setShortcut(QKeySequence::Delete);
|
||||
m_ui->actionDelete->setShortcutContext(Qt::WidgetShortcut); // nullify its effect: delete key event is handled by respective widgets, not here
|
||||
m_ui->actionDownloadFromURL->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_O);
|
||||
m_ui->actionExit->setShortcut(Qt::CTRL + Qt::Key_Q);
|
||||
|
||||
|
|
|
@ -285,6 +285,7 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *mainWindow)
|
|||
connect(header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(saveSettings()));
|
||||
|
||||
m_editHotkey = new QShortcut(Qt::Key_F2, this, SLOT(renameSelectedTorrent()), 0, Qt::WidgetShortcut);
|
||||
m_deleteHotkey = new QShortcut(QKeySequence::Delete, this, SLOT(softDeleteSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
m_permDeleteHotkey = new QShortcut(Qt::SHIFT + Qt::Key_Delete, this, SLOT(permDeleteSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
m_doubleClickHotkey = new QShortcut(Qt::Key_Return, this, SLOT(torrentDoubleClicked()), 0, Qt::WidgetShortcut);
|
||||
m_recheckHotkey = new QShortcut(Qt::CTRL + Qt::Key_R, this, SLOT(recheckSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
|
|
|
@ -132,6 +132,7 @@ private:
|
|||
TransferListSortModel *m_sortFilterModel;
|
||||
MainWindow *m_mainWindow;
|
||||
QShortcut *m_editHotkey;
|
||||
QShortcut *m_deleteHotkey;
|
||||
QShortcut *m_permDeleteHotkey;
|
||||
QShortcut *m_doubleClickHotkey;
|
||||
QShortcut *m_recheckHotkey;
|
||||
|
|
Loading…
Reference in a new issue