mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 04:16:57 +03:00
NOISSUE simplify.
This commit is contained in:
parent
40cf38bc32
commit
0060b50625
21 changed files with 193 additions and 538 deletions
|
|
@ -169,21 +169,17 @@ QHash<int, QByteArray> VersionList::roleNames() const
|
|||
|
||||
std::unique_ptr<Task> VersionList::remoteUpdateTask()
|
||||
{
|
||||
return std::unique_ptr<VersionListRemoteLoadTask>(new VersionListRemoteLoadTask(this, this));
|
||||
return std::unique_ptr<RemoteLoadTask>(new RemoteLoadTask(this));
|
||||
}
|
||||
std::unique_ptr<Task> VersionList::localUpdateTask()
|
||||
{
|
||||
return std::unique_ptr<VersionListLocalLoadTask>(new VersionListLocalLoadTask(this, this));
|
||||
return std::unique_ptr<LocalLoadTask>(new LocalLoadTask(this));
|
||||
}
|
||||
|
||||
QString VersionList::localFilename() const
|
||||
{
|
||||
return m_uid + "/index.json";
|
||||
}
|
||||
QJsonObject VersionList::serialized() const
|
||||
{
|
||||
return Format::serializeVersionList(this);
|
||||
}
|
||||
|
||||
QString VersionList::humanReadable() const
|
||||
{
|
||||
|
|
@ -224,6 +220,11 @@ void VersionList::setVersions(const QVector<VersionPtr> &versions)
|
|||
endResetModel();
|
||||
}
|
||||
|
||||
void VersionList::parse(const QJsonObject& obj)
|
||||
{
|
||||
parseVersionList(obj, this);
|
||||
}
|
||||
|
||||
void VersionList::merge(const BaseEntity::Ptr &other)
|
||||
{
|
||||
const VersionListPtr list = std::dynamic_pointer_cast<VersionList>(other);
|
||||
|
|
@ -285,4 +286,5 @@ BaseVersionPtr VersionList::getRecommended() const
|
|||
|
||||
}
|
||||
|
||||
|
||||
#include "VersionList.moc"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue