NOISSUE do not override already loaded metadata entities with partial data

This commit is contained in:
Petr Mrázek
2017-12-14 02:22:20 +01:00
parent f18afd3d1e
commit daf9d0eaa7
8 changed files with 55 additions and 37 deletions

View File

@ -103,7 +103,7 @@ void Index::parse(const QJsonObject& obj)
parseIndex(obj, this);
}
void Index::merge(const Ptr &other)
void Index::merge(const std::shared_ptr<Index> &other)
{
const QVector<VersionListPtr> lists = std::dynamic_pointer_cast<Index>(other)->m_lists;
// initial load, no need to merge
@ -124,7 +124,7 @@ void Index::merge(const Ptr &other)
{
if (m_uids.contains(list->uid()))
{
m_uids[list->uid()]->merge(list);
m_uids[list->uid()]->mergeFromIndex(list);
}
else
{