Fix tags, downloads, and several vector copies

Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
Alex Peterson
2021-11-05 17:17:11 -07:00
parent c69142b73b
commit 4ce39ea167
20 changed files with 171 additions and 91 deletions
@@ -103,17 +103,17 @@ namespace O3DE::ProjectManager
return modelIndex.data(RoleIncludedGems).toStringList();
}
QStringList GemRepoModel::GetIncludedGemNames(const QModelIndex& modelIndex)
QVector<Tag> GemRepoModel::GetIncludedGemTags(const QModelIndex& modelIndex)
{
QStringList gemNames;
QVector<GemInfo> gemInfos = GetIncludedGemInfos(modelIndex);
QVector<Tag> tags;
const QVector<GemInfo>& gemInfos = GetIncludedGemInfos(modelIndex);
tags.reserve(gemInfos.size());
for (const GemInfo& gemInfo : gemInfos)
{
gemNames.append(gemInfo.m_displayName);
tags.append({ gemInfo.m_displayName, gemInfo.m_name });
}
return gemNames;
return tags;
}
QVector<GemInfo> GemRepoModel::GetIncludedGemInfos(const QModelIndex& modelIndex)