mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-06 15:04:34 +08:00
Improve performance of "filesystem line edit" widgets
Also prevent unnecessary querying on the filesystem by omitting calling setRootPath().
This commit is contained in:
parent
3f7376f26b
commit
e68e3b516e
@ -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…
Reference in New Issue
Block a user