diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-01-05 04:26:46 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-01-05 04:26:46 +0100 |
commit | 0636c03d7c08a90de5180e20dd6106c4cac34a23 (patch) | |
tree | 0e969118c1ae557dbdc2377452638ee9460f94a8 /api/logic/minecraft/ComponentList.cpp | |
parent | ee341b78baf679ba7eac868ce72e313c8e49775f (diff) | |
download | PrismLauncher-0636c03d7c08a90de5180e20dd6106c4cac34a23.tar.gz PrismLauncher-0636c03d7c08a90de5180e20dd6106c4cac34a23.tar.bz2 PrismLauncher-0636c03d7c08a90de5180e20dd6106c4cac34a23.zip |
GH-2087 remove the revert to vanilla functionality, add file download button to version page
Diffstat (limited to 'api/logic/minecraft/ComponentList.cpp')
-rw-r--r-- | api/logic/minecraft/ComponentList.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/api/logic/minecraft/ComponentList.cpp b/api/logic/minecraft/ComponentList.cpp index b4ab2151..dc7f3614 100644 --- a/api/logic/minecraft/ComponentList.cpp +++ b/api/logic/minecraft/ComponentList.cpp @@ -743,42 +743,6 @@ Component * ComponentList::getComponent(int index) return d->components[index].get(); } -bool ComponentList::isVanilla() -{ - for(auto patchptr: d->components) - { - if(patchptr->isCustom()) - return false; - } - return true; -} - -bool ComponentList::revertToVanilla() -{ - // remove patches, if present - auto VersionPatchesCopy = d->components; - for(auto & it: VersionPatchesCopy) - { - if (!it->isCustom()) - { - continue; - } - if(it->isRevertible() || it->isRemovable()) - { - if(!remove(it->getID())) - { - qWarning() << "Couldn't remove" << it->getID() << "from profile!"; - invalidateLaunchProfile(); - scheduleSave(); - return false; - } - } - } - invalidateLaunchProfile(); - scheduleSave(); - return true; -} - QVariant ComponentList::data(const QModelIndex &index, int role) const { if (!index.isValid()) |