diff options
author | flow <flowlnlnln@gmail.com> | 2022-08-10 14:46:28 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2022-08-20 10:47:11 -0300 |
commit | 256f8094f5fed85ff9136e8d0b9c9677d7b9e9db (patch) | |
tree | 474256071eac766b4a6792f99fb9788b39244ca2 /launcher/minecraft/mod | |
parent | 1e2f0ab3083f002071938275a97b13c0c4633e64 (diff) | |
download | PrismLauncher-256f8094f5fed85ff9136e8d0b9c9677d7b9e9db.tar.gz PrismLauncher-256f8094f5fed85ff9136e8d0b9c9677d7b9e9db.tar.bz2 PrismLauncher-256f8094f5fed85ff9136e8d0b9c9677d7b9e9db.zip |
refactor: make Resource Pack model inherit from ResourceFolderModel
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/minecraft/mod')
-rw-r--r-- | launcher/minecraft/mod/ResourcePackFolderModel.cpp | 21 | ||||
-rw-r--r-- | launcher/minecraft/mod/ResourcePackFolderModel.h | 7 |
2 files changed, 3 insertions, 25 deletions
diff --git a/launcher/minecraft/mod/ResourcePackFolderModel.cpp b/launcher/minecraft/mod/ResourcePackFolderModel.cpp index 276804ed..64a04469 100644 --- a/launcher/minecraft/mod/ResourcePackFolderModel.cpp +++ b/launcher/minecraft/mod/ResourcePackFolderModel.cpp @@ -35,24 +35,5 @@ #include "ResourcePackFolderModel.h" -ResourcePackFolderModel::ResourcePackFolderModel(const QString &dir) : ModFolderModel(dir) { -} - -QVariant ResourcePackFolderModel::headerData(int section, Qt::Orientation orientation, int role) const { - if (role == Qt::ToolTipRole) { - switch (section) { - case ActiveColumn: - return tr("Is the resource pack enabled?"); - case NameColumn: - return tr("The name of the resource pack."); - case VersionColumn: - return tr("The version of the resource pack."); - case DateColumn: - return tr("The date and time this resource pack was last changed (or added)."); - default: - return QVariant(); - } - } - - return ModFolderModel::headerData(section, orientation, role); +ResourcePackFolderModel::ResourcePackFolderModel(const QString &dir) : ResourceFolderModel(dir) { } diff --git a/launcher/minecraft/mod/ResourcePackFolderModel.h b/launcher/minecraft/mod/ResourcePackFolderModel.h index 0cd6214b..d2a5bf18 100644 --- a/launcher/minecraft/mod/ResourcePackFolderModel.h +++ b/launcher/minecraft/mod/ResourcePackFolderModel.h @@ -1,13 +1,10 @@ #pragma once -#include "ModFolderModel.h" +#include "ResourceFolderModel.h" -class ResourcePackFolderModel : public ModFolderModel +class ResourcePackFolderModel : public ResourceFolderModel { Q_OBJECT - public: explicit ResourcePackFolderModel(const QString &dir); - - QVariant headerData(int section, Qt::Orientation orientation, int role) const override; }; |