mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-06 23:52:31 -06:00
Add a small delay before processing the key input of search boxes
PR #20465. Closes #20025. Closes #20235.
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
class QKeyEvent;
|
||||
class QTimer;
|
||||
|
||||
class LineEdit final : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -39,6 +42,11 @@ class LineEdit final : public QLineEdit
|
||||
public:
|
||||
explicit LineEdit(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void textChanged(const QString &text);
|
||||
|
||||
private:
|
||||
void keyPressEvent(QKeyEvent *event) override;
|
||||
|
||||
QTimer *m_delayedTextChangedTimer = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user