| 466 | } |
| 467 | |
| 468 | bool ReadingListModel::isReadingSubList(const QModelIndex &mi) |
| 469 | { |
| 470 | if (!mi.isValid()) |
| 471 | return false; |
| 472 | auto item = static_cast<ListItem *>(mi.internalPointer()); |
| 473 | if (typeid(*item) == typeid(ReadingListItem)) { |
| 474 | auto readingListItem = static_cast<ReadingListItem *>(item); |
| 475 | if (readingListItem->parent == rootItem) |
| 476 | return false; |
| 477 | else |
| 478 | return true; |
| 479 | } else |
| 480 | return false; |
| 481 | } |
| 482 | |
| 483 | QString ReadingListModel::name(const QModelIndex &mi) |
| 484 | { |
no test coverage detected