mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 13:47:46 +02:00
Made tar.gz parser
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -120,6 +120,8 @@ QVariant VersionProxyModel::headerData(int section, Qt::Orientation orientation,
|
||||
return tr("Path");
|
||||
case JavaName:
|
||||
return tr("Java Name");
|
||||
case JavaMajor:
|
||||
return tr("Major");
|
||||
case Time:
|
||||
return tr("Released");
|
||||
}
|
||||
@ -139,6 +141,8 @@ QVariant VersionProxyModel::headerData(int section, Qt::Orientation orientation,
|
||||
return tr("Filesystem path to this version");
|
||||
case JavaName:
|
||||
return tr("The alternative name of the java version");
|
||||
case JavaMajor:
|
||||
return tr("The java major version");
|
||||
case Time:
|
||||
return tr("Release date of this version");
|
||||
}
|
||||
@ -175,6 +179,8 @@ QVariant VersionProxyModel::data(const QModelIndex& index, int role) const
|
||||
return sourceModel()->data(parentIndex, BaseVersionList::PathRole);
|
||||
case JavaName:
|
||||
return sourceModel()->data(parentIndex, BaseVersionList::JavaNameRole);
|
||||
case JavaMajor:
|
||||
return sourceModel()->data(parentIndex, BaseVersionList::JavaMajorRole);
|
||||
case Time:
|
||||
return sourceModel()->data(parentIndex, Meta::VersionList::TimeRole).toDate();
|
||||
default:
|
||||
@ -323,6 +329,9 @@ void VersionProxyModel::setSourceModel(QAbstractItemModel* replacingRaw)
|
||||
if (roles.contains(BaseVersionList::JavaNameRole)) {
|
||||
m_columns.push_back(JavaName);
|
||||
}
|
||||
if (roles.contains(BaseVersionList::JavaMajorRole)) {
|
||||
m_columns.push_back(JavaMajor);
|
||||
}
|
||||
if (roles.contains(Meta::VersionList::TimeRole)) {
|
||||
m_columns.push_back(Time);
|
||||
}
|
||||
|
Reference in New Issue
Block a user