diff options
author | Andrew MacFie <amacfie@sent.com> | 2021-01-19 14:32:06 -0500 |
---|---|---|
committer | Andrew MacFie <amacfie@sent.com> | 2021-01-19 14:32:06 -0500 |
commit | c839e4124bf4f3132f1bfe039dfff84f54ac27f3 (patch) | |
tree | 45c08e84181325782af346290f96c438897246e8 /qutebrowser/completion | |
parent | 907b41e9ff8e7a3b09335c6a290d9124da66c0aa (diff) | |
download | qutebrowser-c839e4124bf4f3132f1bfe039dfff84f54ac27f3.tar.gz qutebrowser-c839e4124bf4f3132f1bfe039dfff84f54ac27f3.zip |
Fix name from Qt
Diffstat (limited to 'qutebrowser/completion')
-rw-r--r-- | qutebrowser/completion/models/filepathcategory.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/qutebrowser/completion/models/filepathcategory.py b/qutebrowser/completion/models/filepathcategory.py index 8c25f3584..628bbd85a 100644 --- a/qutebrowser/completion/models/filepathcategory.py +++ b/qutebrowser/completion/models/filepathcategory.py @@ -24,6 +24,8 @@ from typing import Any, List from PyQt5.QtCore import QAbstractListModel, QModelIndex, QObject, Qt, QUrl +from qutebrowser.config import config + class FilePathCategory(QAbstractListModel): """Represent filesystem paths matching a pattern.""" @@ -48,8 +50,8 @@ class FilePathCategory(QAbstractListModel): self._paths = [] elif val.startswith('file:///'): glob_str = QUrl(val).toLocalFile() + '*' - self._paths = sorted([QUrl.fromLocalFile(path).toString() - for path in glob.glob(glob_str)]) + self._paths = sorted(QUrl.fromLocalFile(path).toString() + for path in glob.glob(glob_str)) else: expanded = os.path.expanduser(val) if os.path.isabs(expanded): @@ -66,7 +68,7 @@ class FilePathCategory(QAbstractListModel): self._paths = [] def data( - self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole + self, index: QModelIndex, role: int = Qt.DisplayRole ) -> Any: """Implement abstract method in QAbstractListModel.""" if role == Qt.DisplayRole and index.column() == 0: |