summaryrefslogtreecommitdiffstats
path: root/logic/ModList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/ModList.cpp')
-rw-r--r--logic/ModList.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/logic/ModList.cpp b/logic/ModList.cpp
index 79b56986..3382a6ef 100644
--- a/logic/ModList.cpp
+++ b/logic/ModList.cpp
@@ -26,6 +26,7 @@
ModList::ModList(const QString &dir, const QString &list_file)
: QAbstractListModel(), m_dir(dir), m_list_file(list_file)
{
+ ensureFolderPathExists(m_dir.absolutePath());
m_dir.setFilter(QDir::Readable | QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs |
QDir::NoSymLinks);
m_dir.setSorting(QDir::Name | QDir::IgnoreCase | QDir::LocaleAware);
@@ -410,7 +411,7 @@ QVariant ModList::data(const QModelIndex &index, int role) const
switch (role)
{
case Qt::DisplayRole:
- switch (index.column())
+ switch (column)
{
case NameColumn:
return mods[row].name();
@@ -425,7 +426,7 @@ QVariant ModList::data(const QModelIndex &index, int role) const
return mods[row].mmc_id();
case Qt::CheckStateRole:
- switch (index.column())
+ switch (column)
{
case ActiveColumn:
return mods[row].enabled() ? Qt::Checked : Qt::Unchecked;