diff -r d75dfc0d10f2 -r 9c21b2746218 WebBrowser/Download/DownloadModel.py --- a/WebBrowser/Download/DownloadModel.py Thu Mar 23 18:58:56 2017 +0100 +++ b/WebBrowser/Download/DownloadModel.py Thu Mar 23 19:06:13 2017 +0100 @@ -45,19 +45,22 @@ return None - def rowCount(self, parent=QModelIndex()): + def rowCount(self, parent=None): """ Public method to get the number of rows of the model. @param parent parent index (QModelIndex) @return number of rows (integer) """ + if parent is None: + parent = QModelIndex() + if parent.isValid(): return 0 else: return self.__manager.count() - def removeRows(self, row, count, parent=QModelIndex()): + def removeRows(self, row, count, parent=None): """ Public method to remove bookmarks from the model. @@ -66,6 +69,9 @@ @param parent index of the parent bookmark node (QModelIndex) @return flag indicating successful removal (boolean) """ + if parent is None: + parent = QModelIndex() + if parent.isValid(): return False