mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Updated Resource Pack Formats
superseeds #4242 also this adds support for min_format and max_format and the major.minor versioning. Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
98c3129424
commit
d3f8dfe65c
7 changed files with 309 additions and 115 deletions
|
|
@ -69,17 +69,8 @@ QVariant DataPackFolderModel::data(const QModelIndex& index, int role) const
|
|||
case Qt::DisplayRole:
|
||||
switch (column) {
|
||||
case PackFormatColumn: {
|
||||
auto& resource = at(row);
|
||||
auto pack_format = resource.packFormat();
|
||||
if (pack_format == 0)
|
||||
return tr("Unrecognized");
|
||||
|
||||
auto version_bounds = resource.compatibleVersions();
|
||||
if (version_bounds.first.toString().isEmpty())
|
||||
return QString::number(pack_format);
|
||||
|
||||
return QString("%1 (%2 - %3)")
|
||||
.arg(QString::number(pack_format), version_bounds.first.toString(), version_bounds.second.toString());
|
||||
const auto& resource = at(row);
|
||||
return resource.packFormatStr();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -118,7 +109,7 @@ QVariant DataPackFolderModel::data(const QModelIndex& index, int role) const
|
|||
case ProviderColumn:
|
||||
mappedIndex = index.siblingAtColumn(ResourceFolderModel::ProviderColumn);
|
||||
break;
|
||||
// FIXME: there is no size column due to an oversight
|
||||
// FIXME: there is no size column due to an oversight
|
||||
}
|
||||
|
||||
if (mappedIndex.isValid()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue