aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/mod/TexturePackFolderModel.cpp
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-28 13:00:08 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-28 13:00:08 -0700
commit4eb9083ddc3c57f45d252ceae18d3e9dbf4ee4a3 (patch)
tree3afed793299f611462a316a0ac7861a178f7bf04 /launcher/minecraft/mod/TexturePackFolderModel.cpp
parentb28f682ad9726c536f49579a3bd810cacc6e45ef (diff)
downloadPrismLauncher-4eb9083ddc3c57f45d252ceae18d3e9dbf4ee4a3.tar.gz
PrismLauncher-4eb9083ddc3c57f45d252ceae18d3e9dbf4ee4a3.tar.bz2
PrismLauncher-4eb9083ddc3c57f45d252ceae18d3e9dbf4ee4a3.zip
refactor: column names as class property, use string names in setting
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/minecraft/mod/TexturePackFolderModel.cpp')
-rw-r--r--launcher/minecraft/mod/TexturePackFolderModel.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/launcher/minecraft/mod/TexturePackFolderModel.cpp b/launcher/minecraft/mod/TexturePackFolderModel.cpp
index 76145b3b..898d128f 100644
--- a/launcher/minecraft/mod/TexturePackFolderModel.cpp
+++ b/launcher/minecraft/mod/TexturePackFolderModel.cpp
@@ -45,6 +45,8 @@
TexturePackFolderModel::TexturePackFolderModel(const QString& dir, BaseInstance* instance)
: ResourceFolderModel(QDir(dir), instance)
{
+ m_column_names = QStringList({ "Enable", "Image", "Name", "Last Modified" });
+ m_column_names_translated = QStringList({ tr("Enable"), tr("Image"), tr("Name"), tr("Last Modified") });
m_column_sort_keys = { SortType::ENABLED, SortType::NAME, SortType::NAME, SortType::DATE };
m_column_resize_modes = { QHeaderView::ResizeToContents, QHeaderView::ResizeToContents, QHeaderView::Stretch, QHeaderView::ResizeToContents};
@@ -118,13 +120,10 @@ QVariant TexturePackFolderModel::headerData(int section, Qt::Orientation orienta
case Qt::DisplayRole:
switch (section) {
case ActiveColumn:
- return tr("Enable");
case NameColumn:
- return tr("Name");
case DateColumn:
- return tr("Last modified");
case ImageColumn:
- return tr("Image");
+ return columnNames().at(section);
default:
return {};
}