From 0636c03d7c08a90de5180e20dd6106c4cac34a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 5 Jan 2018 04:26:46 +0100 Subject: GH-2087 remove the revert to vanilla functionality, add file download button to version page --- api/logic/minecraft/ComponentList.cpp | 36 ----------------------------------- 1 file changed, 36 deletions(-) (limited to 'api/logic/minecraft/ComponentList.cpp') 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()) -- cgit v1.2.3