| 343 | } |
| 344 | |
| 345 | void InstanceList::deleteInstance(const InstanceId& id) |
| 346 | { |
| 347 | auto inst = getInstanceById(id); |
| 348 | if (!inst) { |
| 349 | qDebug() << "Cannot delete instance" << id << ". No such instance is present (deleted externally?)."; |
| 350 | return; |
| 351 | } |
| 352 | |
| 353 | if (m_instanceGroupIndex.remove(id)) { |
| 354 | saveGroupList(); |
| 355 | } |
| 356 | |
| 357 | qDebug() << "Will delete instance" << id; |
| 358 | if (!FS::deletePath(inst->instanceRoot())) { |
| 359 | qWarning() << "Deletion of instance" << id << "has not been completely successful ..."; |
| 360 | return; |
| 361 | } |
| 362 | |
| 363 | qDebug() << "Instance" << id << "has been deleted by the launcher."; |
| 364 | } |
| 365 | |
| 366 | static QMap<InstanceId, InstanceLocator> getIdMapping(const QList<InstancePtr>& list) |
| 367 | { |
no test coverage detected