| 1093 | return idFirst; |
| 1094 | } |
| 1095 | QModelIndex ComicModel::getIndexFromId(quint64 id) |
| 1096 | { |
| 1097 | QList<ComicItem *>::ConstIterator itr; |
| 1098 | int i = 0; |
| 1099 | for (itr = _data.constBegin(); itr != _data.constEnd(); itr++) { |
| 1100 | if ((*itr)->data(ComicModel::Id).toULongLong() == id) |
| 1101 | break; |
| 1102 | i++; |
| 1103 | } |
| 1104 | |
| 1105 | return index(i, 0); |
| 1106 | } |
| 1107 | |
| 1108 | // TODO completely inefficiently |
| 1109 | QList<QModelIndex> ComicModel::getIndexesFromIds(const QList<qulonglong> &comicIds) |