mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Merge pull request #7054 from evsh/fix-file-widget
Do not show completion when text is not being edited
This commit is contained in:
commit
f2e771ddc0
@ -207,8 +207,6 @@ Private::FileLineEdit::FileLineEdit(QWidget *parent)
|
|||||||
m_completer->setModel(m_completerModel);
|
m_completer->setModel(m_completerModel);
|
||||||
m_completer->setCompletionMode(QCompleter::PopupCompletion);
|
m_completer->setCompletionMode(QCompleter::PopupCompletion);
|
||||||
setCompleter(m_completer);
|
setCompleter(m_completer);
|
||||||
|
|
||||||
connect(m_completerModel, &QFileSystemModel::directoryLoaded, this, &FileLineEdit::showCompletionPopup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Private::FileLineEdit::~FileLineEdit()
|
Private::FileLineEdit::~FileLineEdit()
|
||||||
|
@ -132,11 +132,9 @@ namespace Private
|
|||||||
void keyPressEvent(QKeyEvent *event) override;
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
void contextMenuEvent(QContextMenuEvent *event) override;
|
void contextMenuEvent(QContextMenuEvent *event) override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void showCompletionPopup();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QString warningText(FileSystemPathValidator::TestResult r);
|
static QString warningText(FileSystemPathValidator::TestResult r);
|
||||||
|
void showCompletionPopup();
|
||||||
|
|
||||||
QFileSystemModel *m_completerModel;
|
QFileSystemModel *m_completerModel;
|
||||||
QCompleter *m_completer;
|
QCompleter *m_completer;
|
||||||
|
Loading…
Reference in New Issue
Block a user