Fix DownloadModel.itemFlags with invalid index
This commit is contained in:
parent
4ea8584556
commit
de03feabfe
@ -1341,7 +1341,7 @@ class DownloadModel(QAbstractListModel):
|
||||
The default would be Qt.ItemIsEnabled | Qt.ItemIsSelectable.
|
||||
"""
|
||||
if not index.isValid():
|
||||
return 0
|
||||
return Qt.ItemFlags()
|
||||
return Qt.ItemIsEnabled | Qt.ItemNeverHasChildren
|
||||
|
||||
def rowCount(self, parent=QModelIndex()):
|
||||
|
Loading…
Reference in New Issue
Block a user