| 17 | } |
| 18 | |
| 19 | int ReadingListModel::rowCount(const QModelIndex &parent) const |
| 20 | { |
| 21 | if (!parent.isValid()) // TOP |
| 22 | { |
| 23 | int separatorsCount = 2; // labels.isEmpty()?1:2; |
| 24 | return specialLists.count() + labels.count() + rootItem->childCount() + separatorsCount; |
| 25 | } else { |
| 26 | auto item = static_cast<ListItem *>(parent.internalPointer()); |
| 27 | |
| 28 | if (typeid(*item) == typeid(ReadingListItem)) { |
| 29 | auto item = static_cast<ReadingListItem *>(parent.internalPointer()); |
| 30 | return item->childCount(); |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | return 0; |
| 35 | } |
| 36 | |
| 37 | int ReadingListModel::columnCount(const QModelIndex &parent) const |
| 38 | { |
nothing calls this directly
no test coverage detected