Enable Ctrl+F hotkey for more inputs

PR #20131.
This commit is contained in:
thalieht
2023-12-19 19:52:47 +02:00
committed by GitHub
parent 4057972b2d
commit 8dcc734df5
5 changed files with 33 additions and 6 deletions

View File

@@ -382,6 +382,12 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::TorrentDescriptor &to
m_filterLine->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
connect(m_filterLine, &LineEdit::textChanged, m_ui->contentTreeView, &TorrentContentWidget::setFilterPattern);
m_ui->contentFilterLayout->insertWidget(3, m_filterLine);
const auto *focusSearchHotkey = new QShortcut(QKeySequence::Find, this);
connect(focusSearchHotkey, &QShortcut::activated, this, [this]()
{
m_filterLine->setFocus();
m_filterLine->selectAll();
});
loadState();