Browse Source

Improve performance of "filesystem line edit" widgets

Also prevent unnecessary querying on the filesystem by omitting
calling setRootPath().
adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
e68e3b516e
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 5
      src/gui/fspathedit_p.cpp

5
src/gui/fspathedit_p.cpp

@ -208,8 +208,11 @@ Private::FileLineEdit::FileLineEdit(QWidget *parent) @@ -208,8 +208,11 @@ Private::FileLineEdit::FileLineEdit(QWidget *parent)
, m_browseAction {nullptr}
, m_warningAction {nullptr}
{
m_completerModel->setRootPath({});
m_iconProvider.setOptions(QFileIconProvider::DontUseCustomDirectoryIcons);
m_completerModel->setIconProvider(&m_iconProvider);
m_completerModel->setOptions(QFileSystemModel::DontWatchForChanges);
m_completer->setModel(m_completerModel);
m_completer->setCompletionMode(QCompleter::PopupCompletion);
setCompleter(m_completer);

Loading…
Cancel
Save