QModelIndexList IdentityModel::indexListForValue(const QVariant &value) const { QModelIndexList result; const int i = identityIndex(value.value<Identity>()); if (-1 != i) result.append(index(i, 0)); return result; }
QModelIndex IdentityModel::indexForValue(const QVariant &value) const { return createIndex(identityIndex(value.value<Identity>()), 0, 0); }