| 32 | } |
| 33 | |
| 34 | QVariant LocalComicListModel::data(const QModelIndex &index, int role) const |
| 35 | { |
| 36 | if (!index.isValid()) |
| 37 | return QVariant(); |
| 38 | |
| 39 | if (role == Qt::DecorationRole) { |
| 40 | return QVariant(); |
| 41 | } |
| 42 | if (role == Qt::TextAlignmentRole) { |
| 43 | // TODO |
| 44 | } |
| 45 | |
| 46 | if (role != Qt::DisplayRole) |
| 47 | return QVariant(); |
| 48 | |
| 49 | int row = index.row(); |
| 50 | |
| 51 | // if(row < _data.count()) |
| 52 | return _data[row].getFileName(); |
| 53 | // else |
| 54 | // return QVariant(); |
| 55 | } |
| 56 | |
| 57 | Qt::ItemFlags LocalComicListModel::flags(const QModelIndex &index) const |
| 58 | { |
nothing calls this directly
no test coverage detected