| 502 | } |
| 503 | |
| 504 | bool PackProfile::revertToBase(int index) |
| 505 | { |
| 506 | auto patch = getComponent(index); |
| 507 | if (!patch->isRevertible()) |
| 508 | { |
| 509 | qDebug() << "Patch" << patch->getID() << "is not revertible"; |
| 510 | return false; |
| 511 | } |
| 512 | if(!patch->revert()) |
| 513 | { |
| 514 | qCritical() << "Patch" << patch->getID() << "could not be reverted"; |
| 515 | return false; |
| 516 | } |
| 517 | invalidateLaunchProfile(); |
| 518 | scheduleSave(); |
| 519 | return true; |
| 520 | } |
| 521 | |
| 522 | Component * PackProfile::getComponent(const QString &id) |
| 523 | { |
no test coverage detected