aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/ModFolderModel.cpp
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-07-26 21:33:15 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-07-26 21:33:15 +0300
commitc778dcbc9c326c1bf563852d7393bf43c1514346 (patch)
treeb0b556492b5c83d07858f60d56feadca64983648 /launcher/minecraft/mod/ModFolderModel.cpp
parentd7f4e40f85d1e253fe62e1c9e1cfb1842ffb0c86 (diff)
parenta0944dab7a8fff9b5d9c2c8d35cc55349c93a3cd (diff)
downloadPrismLauncher-c778dcbc9c326c1bf563852d7393bf43c1514346.tar.gz
PrismLauncher-c778dcbc9c326c1bf563852d7393bf43c1514346.tar.bz2
PrismLauncher-c778dcbc9c326c1bf563852d7393bf43c1514346.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into curse
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());