| 159 | } |
| 160 | |
| 161 | bool ResourceFolderModel::deleteResources(const QModelIndexList& indexes) |
| 162 | { |
| 163 | if (!m_can_interact) |
| 164 | return false; |
| 165 | |
| 166 | if (indexes.isEmpty()) |
| 167 | return true; |
| 168 | |
| 169 | for (auto i : indexes) { |
| 170 | if (i.column() != 0) { |
| 171 | continue; |
| 172 | } |
| 173 | |
| 174 | auto& resource = m_resources.at(i.row()); |
| 175 | |
| 176 | resource->destroy(); |
| 177 | } |
| 178 | |
| 179 | update(); |
| 180 | |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | bool ResourceFolderModel::setResourceEnabled(const QModelIndexList &indexes, EnableAction action) |
| 185 | { |
no test coverage detected