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.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/launcher/minecraft/mod/ModFolderModel.cpp b/launcher/minecraft/mod/ModFolderModel.cpp
index 5aadc2f1..f258ad69 100644
--- a/launcher/minecraft/mod/ModFolderModel.cpp
+++ b/launcher/minecraft/mod/ModFolderModel.cpp
@@ -83,8 +83,15 @@ QVariant ModFolderModel::data(const QModelIndex &index, int role) const
}
case DateColumn:
return m_resources[row]->dateTimeChanged();
- case ProviderColumn:
- return at(row)->provider();
+ case ProviderColumn: {
+ auto provider = at(row)->provider();
+ if (!provider.has_value()) {
+ //: Unknown mod provider (i.e. not Modrinth, CurseForge, etc...)
+ return tr("Unknown");
+ }
+
+ return provider.value();
+ }
default:
return QVariant();
}