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:
Trial97 2026-03-17 00:40:49 +02:00
parent 98c3129424
commit d3f8dfe65c
No known key found for this signature in database
GPG key ID: 55EF5DA53DB36318
7 changed files with 309 additions and 115 deletions

View file

@ -69,17 +69,8 @@ QVariant ResourcePackFolderModel::data(const QModelIndex& index, int role) const
return rowBackground(row);
case Qt::DisplayRole: {
if (column == 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;
}