int BookmarksModel::rowCount(const QModelIndex &parent) const { if (parent.column() > 0) { return 0; } BookmarkItem* itm = item(parent); return itm->children().count(); }
bool BookmarksModel::hasChildren(const QModelIndex &parent) const { BookmarkItem* itm = item(parent); return !itm->children().isEmpty(); }