diff -r d75dfc0d10f2 -r 9c21b2746218 WebBrowser/Passwords/PasswordModel.py --- a/WebBrowser/Passwords/PasswordModel.py Thu Mar 23 18:58:56 2017 +0100 +++ b/WebBrowser/Passwords/PasswordModel.py Thu Mar 23 19:06:13 2017 +0100 @@ -61,7 +61,7 @@ self.beginResetModel() self.endResetModel() - def removeRows(self, row, count, parent=QModelIndex()): + def removeRows(self, row, count, parent=None): """ Public method to remove entries from the model. @@ -70,6 +70,9 @@ @param parent parent index (QModelIndex) @return flag indicating success (boolean) """ + if parent is None: + parent = QModelIndex() + if parent.isValid(): return False @@ -89,23 +92,26 @@ return True - 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.sitesCount() - def columnCount(self, parent=QModelIndex()): + def columnCount(self, parent=None): """ Public method to get the number of columns of the model. - @param parent parent index (QModelIndex) + @param parent parent index (QModelIndex) (Unused) @return number of columns (integer) """ if self.__showPasswords: