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.
|
The default would be Qt.ItemIsEnabled | Qt.ItemIsSelectable.
|
||||||
"""
|
"""
|
||||||
if not index.isValid():
|
if not index.isValid():
|
||||||
return 0
|
return Qt.ItemFlags()
|
||||||
return Qt.ItemIsEnabled | Qt.ItemNeverHasChildren
|
return Qt.ItemIsEnabled | Qt.ItemNeverHasChildren
|
||||||
|
|
||||||
def rowCount(self, parent=QModelIndex()):
|
def rowCount(self, parent=QModelIndex()):
|
||||||
|
Loading…
Reference in New Issue
Block a user