| 470 | } |
| 471 | |
| 472 | bool PackProfile::revertToBase(int index) |
| 473 | { |
| 474 | auto patch = getComponent(index); |
| 475 | if (!patch->isRevertible()) { |
| 476 | qCDebug(instanceProfileC) << d->m_instance->name() << "|" << "Patch" << patch->getID() << "is not revertible"; |
| 477 | return false; |
| 478 | } |
| 479 | if (!patch->revert()) { |
| 480 | qCCritical(instanceProfileC) << d->m_instance->name() << "|" << "Patch" << patch->getID() << "could not be reverted"; |
| 481 | return false; |
| 482 | } |
| 483 | invalidateLaunchProfile(); |
| 484 | scheduleSave(); |
| 485 | return true; |
| 486 | } |
| 487 | |
| 488 | ComponentPtr PackProfile::getComponent(const QString& id) |
| 489 | { |
no test coverage detected