| 713 | } |
| 714 | |
| 715 | bool PackProfile::revertToBase(int index) |
| 716 | { |
| 717 | auto patch = getComponent(index); |
| 718 | if (!patch->isRevertible()) |
| 719 | { |
| 720 | qDebug() << "Patch" << patch->getID() << "is not revertible"; |
| 721 | return false; |
| 722 | } |
| 723 | if(!patch->revert()) |
| 724 | { |
| 725 | qCritical() << "Patch" << patch->getID() << "could not be reverted"; |
| 726 | return false; |
| 727 | } |
| 728 | invalidateLaunchProfile(); |
| 729 | scheduleSave(); |
| 730 | return true; |
| 731 | } |
| 732 | |
| 733 | Component * PackProfile::getComponent(const QString &id) |
| 734 | { |
no test coverage detected