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.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/ModFolderModel.cpp b/launcher/minecraft/mod/ModFolderModel.cpp
index 5ee08cbf..e72eb13e 100644
--- a/launcher/minecraft/mod/ModFolderModel.cpp
+++ b/launcher/minecraft/mod/ModFolderModel.cpp
@@ -259,6 +259,18 @@ bool ModFolderModel::isValid()
return m_dir.exists() && m_dir.isReadable();
}
+auto ModFolderModel::selectedMods(QModelIndexList& indexes) -> std::list<Mod>
+{
+ std::list<Mod> selected_mods;
+ for (auto i : indexes) {
+ if(i.column() != 0)
+ continue;
+
+ selected_mods.push_back(mods[i.row()]);
+ }
+ return selected_mods;
+}
+
// FIXME: this does not take disabled mod (with extra .disable extension) into account...
bool ModFolderModel::installMod(const QString &filename)
{