--- a/WebBrowser/Bookmarks/AddBookmarkDialog.py Thu Mar 23 18:58:56 2017 +0100 +++ b/WebBrowser/Bookmarks/AddBookmarkDialog.py Thu Mar 23 19:06:13 2017 +0100 @@ -57,13 +57,15 @@ """ return sourceColumn == 0 - def hasChildren(self, parent=QModelIndex()): + def hasChildren(self, parent=None): """ Public method to check, if a parent node has some children. @param parent index of the parent node (QModelIndex) @return flag indicating the presence of children (boolean) """ + if parent is None: + parent = QModelIndex() sindex = self.mapToSource(parent) return self.sourceModel().hasChildren(sindex)