mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 17:12:31 -06:00
Use Qt object ownership to handle QShortcut deletions
This commit is contained in:
@@ -137,8 +137,8 @@ SearchWidget::SearchWidget(MainWindow *mainWindow)
|
||||
connect(m_ui->selectPlugin, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged)
|
||||
, this, &SearchWidget::fillCatCombobox);
|
||||
|
||||
m_focusSearchHotkey = new QShortcut(QKeySequence::Find, this);
|
||||
connect(m_focusSearchHotkey, &QShortcut::activated, this, &SearchWidget::toggleFocusBetweenLineEdits);
|
||||
const auto focusSearchHotkey = new QShortcut(QKeySequence::Find, this);
|
||||
connect(focusSearchHotkey, &QShortcut::activated, this, &SearchWidget::toggleFocusBetweenLineEdits);
|
||||
}
|
||||
|
||||
void SearchWidget::fillCatCombobox()
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <QPointer>
|
||||
#include <QWidget>
|
||||
|
||||
class QShortcut;
|
||||
class QTabWidget;
|
||||
|
||||
class MainWindow;
|
||||
@@ -80,5 +79,4 @@ private:
|
||||
QList<SearchJobWidget *> m_allTabs; // To store all tabs
|
||||
MainWindow *m_mainWindow;
|
||||
bool m_isNewQueryString;
|
||||
QShortcut *m_focusSearchHotkey;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user