From 6b65f8add84ed4b6681e4f120b9e99a0e0d61935 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 3 Jul 2017 12:57:02 +0200 Subject: [PATCH] Do not show completion when text is not being edited --- src/gui/fspathedit_p.cpp | 2 -- src/gui/fspathedit_p.h | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/gui/fspathedit_p.cpp b/src/gui/fspathedit_p.cpp index e1762e5c0..f03194d13 100644 --- a/src/gui/fspathedit_p.cpp +++ b/src/gui/fspathedit_p.cpp @@ -207,8 +207,6 @@ Private::FileLineEdit::FileLineEdit(QWidget *parent) m_completer->setModel(m_completerModel); m_completer->setCompletionMode(QCompleter::PopupCompletion); setCompleter(m_completer); - - connect(m_completerModel, &QFileSystemModel::directoryLoaded, this, &FileLineEdit::showCompletionPopup); } Private::FileLineEdit::~FileLineEdit() diff --git a/src/gui/fspathedit_p.h b/src/gui/fspathedit_p.h index 618aef0b3..7edf9455a 100644 --- a/src/gui/fspathedit_p.h +++ b/src/gui/fspathedit_p.h @@ -132,11 +132,9 @@ namespace Private void keyPressEvent(QKeyEvent *event) override; void contextMenuEvent(QContextMenuEvent *event) override; - private slots: - void showCompletionPopup(); - private: static QString warningText(FileSystemPathValidator::TestResult r); + void showCompletionPopup(); QFileSystemModel *m_completerModel; QCompleter *m_completer;