Fix DownloadModel.itemFlags with invalid index

This commit is contained in:
Florian Bruhin 2016-09-11 17:10:52 +02:00
parent 4ea8584556
commit de03feabfe

View File

@ -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()):