NOISSUE hack it together enough to get launching back
Meta index will now always return valid objects. They just might never load if they don't exist on the server.
This commit is contained in:
parent
e46aba9da5
commit
2660418d58
12 changed files with 162 additions and 58 deletions
|
@ -83,17 +83,19 @@ bool Index::hasUid(const QString &uid) const
|
|||
|
||||
VersionListPtr Index::get(const QString &uid)
|
||||
{
|
||||
return m_uids.value(uid, nullptr);
|
||||
VersionListPtr out = m_uids.value(uid, nullptr);
|
||||
if(!out)
|
||||
{
|
||||
out = std::make_shared<VersionList>(uid);
|
||||
m_uids[uid] = out;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
VersionPtr Index::get(const QString &uid, const QString &version)
|
||||
{
|
||||
auto list = get(uid);
|
||||
if(list)
|
||||
{
|
||||
return list->getVersion(version);
|
||||
}
|
||||
return nullptr;
|
||||
return list->getVersion(version);
|
||||
}
|
||||
|
||||
void Index::parse(const QJsonObject& obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue