aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ModFolderModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/minecraft/mod/ModFolderModel.cpp')
-rw-r--r--launcher/minecraft/mod/ModFolderModel.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/launcher/minecraft/mod/ModFolderModel.cpp b/launcher/minecraft/mod/ModFolderModel.cpp
index af98d834..51383edf 100644
--- a/launcher/minecraft/mod/ModFolderModel.cpp
+++ b/launcher/minecraft/mod/ModFolderModel.cpp
@@ -199,10 +199,10 @@ Task* ModFolderModel::createParseTask(Resource& resource)
bool ModFolderModel::uninstallMod(const QString& filename, bool preserve_metadata)
{
- for(auto mod : allMods()){
- if(mod->fileinfo().fileName() == filename){
+ for(auto mod : allMods()) {
+ if(mod->fileinfo().fileName() == filename) {
auto index_dir = indexDir();
- mod->destroy(index_dir, preserve_metadata);
+ mod->destroy(index_dir, preserve_metadata, false);
update();
@@ -215,16 +215,11 @@ bool ModFolderModel::uninstallMod(const QString& filename, bool preserve_metadat
bool ModFolderModel::deleteMods(const QModelIndexList& indexes)
{
- if(!m_can_interact) {
- return false;
- }
-
- if(indexes.isEmpty())
+ if (indexes.isEmpty())
return true;
- for (auto i: indexes)
- {
- if(i.column() != 0) {
+ for (auto i : indexes) {
+ if (i.column() != 0) {
continue;
}
auto m = at(i.row());