summaryrefslogtreecommitdiff
path: root/qutebrowser/completion/models/filepathcategory.py
diff options
context:
space:
mode:
Diffstat (limited to 'qutebrowser/completion/models/filepathcategory.py')
-rw-r--r--qutebrowser/completion/models/filepathcategory.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/qutebrowser/completion/models/filepathcategory.py b/qutebrowser/completion/models/filepathcategory.py
index 58d90869a..66bf41ebd 100644
--- a/qutebrowser/completion/models/filepathcategory.py
+++ b/qutebrowser/completion/models/filepathcategory.py
@@ -31,7 +31,7 @@ import os
import os.path
from typing import List, Optional, Iterable
-from PyQt5.QtCore import QAbstractListModel, QModelIndex, QObject, Qt, QUrl
+from qutebrowser.qt.core import QAbstractListModel, QModelIndex, QObject, Qt, QUrl
from qutebrowser.config import config
from qutebrowser.utils import log
@@ -100,9 +100,9 @@ class FilePathCategory(QAbstractListModel):
paths = self._glob(expanded)
self._paths = sorted(self._contract_user(val, path) for path in paths)
- def data(self, index: QModelIndex, role: int = Qt.DisplayRole) -> Optional[str]:
+ def data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole) -> Optional[str]:
"""Implement abstract method in QAbstractListModel."""
- if role == Qt.DisplayRole and index.column() == 0:
+ if role == Qt.ItemDataRole.DisplayRole and index.column() == 0:
return self._paths[index.row()]
return None