| 187 | } |
| 188 | |
| 189 | bool ModFolderModel::deleteMods(const QModelIndexList& indexes) |
| 190 | { |
| 191 | if(!m_can_interact) { |
| 192 | return false; |
| 193 | } |
| 194 | |
| 195 | if(indexes.isEmpty()) |
| 196 | return true; |
| 197 | |
| 198 | for (auto i: indexes) |
| 199 | { |
| 200 | if(i.column() != 0) { |
| 201 | continue; |
| 202 | } |
| 203 | auto m = at(i.row()); |
| 204 | auto index_dir = indexDir(); |
| 205 | m->destroy(index_dir); |
| 206 | } |
| 207 | |
| 208 | update(); |
| 209 | |
| 210 | return true; |
| 211 | } |
| 212 | |
| 213 | bool ModFolderModel::isValid() |
| 214 | { |
no test coverage detected