Browse Source

Merge pull request #7054 from evsh/fix-file-widget

Do not show completion when text is not being edited
adaptive-webui-19844
sledgehammer999 7 years ago committed by GitHub
parent
commit
f2e771ddc0
  1. 2
      src/gui/fspathedit_p.cpp
  2. 4
      src/gui/fspathedit_p.h

2
src/gui/fspathedit_p.cpp

@ -207,8 +207,6 @@ Private::FileLineEdit::FileLineEdit(QWidget *parent) @@ -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()

4
src/gui/fspathedit_p.h

@ -132,11 +132,9 @@ namespace Private @@ -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;

Loading…
Cancel
Save