summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/WorldList.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-12-11 23:53:14 +0100
committerPetr Mrázek <peterix@gmail.com>2018-12-11 23:53:14 +0100
commit13b293dd6518f8e3c80afd6fe40629e3caee69dc (patch)
tree1af24d9e9e0ea426138f18d24c7bfbeab7803d9b /api/logic/minecraft/WorldList.cpp
parentde568b32b85b24fb24fdec2bc90066bf00b2f013 (diff)
downloadMultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.gz
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.lz
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.tar.xz
MultiMC-13b293dd6518f8e3c80afd6fe40629e3caee69dc.zip
GH-2374 fix missing alternating backgrounds in worlds, add gametype column
Diffstat (limited to 'api/logic/minecraft/WorldList.cpp')
-rw-r--r--api/logic/minecraft/WorldList.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/api/logic/minecraft/WorldList.cpp b/api/logic/minecraft/WorldList.cpp
index 79a5bf38..827b2d63 100644
--- a/api/logic/minecraft/WorldList.cpp
+++ b/api/logic/minecraft/WorldList.cpp
@@ -138,7 +138,7 @@ bool WorldList::deleteWorlds(int first, int last)
int WorldList::columnCount(const QModelIndex &parent) const
{
- return 2;
+ return 3;
}
QVariant WorldList::data(const QModelIndex &index, int role) const
@@ -161,6 +161,9 @@ QVariant WorldList::data(const QModelIndex &index, int role) const
case NameColumn:
return world.name();
+ case GameModeColumn:
+ return gameTypeToString(world.gameType());
+
case LastPlayedColumn:
return world.lastPlayed();
@@ -206,6 +209,8 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol
{
case NameColumn:
return tr("Name");
+ case GameModeColumn:
+ return tr("Game Mode");
case LastPlayedColumn:
return tr("Last Played");
default:
@@ -217,6 +222,8 @@ QVariant WorldList::headerData(int section, Qt::Orientation orientation, int rol
{
case NameColumn:
return tr("The name of the world.");
+ case GameModeColumn:
+ return tr("Game mode of the world.");
case LastPlayedColumn:
return tr("Date and time the world was last played.");
default: