propagate side as enum instead of Qstring
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
178965676e
commit
be963764ea
18 changed files with 89 additions and 131 deletions
|
@ -47,6 +47,13 @@ enum class ResourceType { MOD, RESOURCE_PACK, SHADER_PACK, MODPACK, DATA_PACK };
|
|||
|
||||
enum class DependencyType { REQUIRED, OPTIONAL, INCOMPATIBLE, EMBEDDED, TOOL, INCLUDE, UNKNOWN };
|
||||
|
||||
enum class Side { NoSide = 0, ClientSide = 1 << 0, ServerSide = 1 << 1, UniversalSide = ClientSide | ServerSide };
|
||||
|
||||
namespace SideUtils {
|
||||
QString toString(Side side);
|
||||
Side fromString(QString side);
|
||||
} // namespace SideUtils
|
||||
|
||||
namespace ProviderCapabilities {
|
||||
const char* name(ResourceProvider);
|
||||
QString readableName(ResourceProvider);
|
||||
|
@ -114,7 +121,7 @@ struct IndexedVersion {
|
|||
bool is_preferred = true;
|
||||
QString changelog;
|
||||
QList<Dependency> dependencies;
|
||||
QString side; // this is for flame API
|
||||
Side side; // this is for flame API
|
||||
|
||||
// For internal use, not provided by APIs
|
||||
bool is_currently_selected = false;
|
||||
|
@ -145,7 +152,7 @@ struct IndexedPack {
|
|||
QString logoName;
|
||||
QString logoUrl;
|
||||
QString websiteUrl;
|
||||
QString side;
|
||||
Side side;
|
||||
|
||||
bool versionsLoaded = false;
|
||||
QList<IndexedVersion> versions;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue