Improves Gem Catalog Search (searches, Name, DisplayName, Creator, Summary, and Features), Gem Display Names now used in Gem Catalog

Signed-off-by: nggieber <nggieber@amazon.com>
This commit is contained in:
nggieber
2021-08-23 08:28:49 -07:00
parent b4279ab3d8
commit 6eb9273763
8 changed files with 43 additions and 9 deletions
@@ -30,6 +30,7 @@ namespace O3DE::ProjectManager
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
item->setData(gemInfo.m_name, RoleName);
item->setData(gemInfo.m_displayName, RoleDisplayName);
item->setData(gemInfo.m_creator, RoleCreator);
item->setData(gemInfo.m_gemOrigin, RoleGemOrigin);
item->setData(aznumeric_cast<int>(gemInfo.m_platforms), RolePlatforms);
@@ -64,6 +65,20 @@ namespace O3DE::ProjectManager
return modelIndex.data(RoleName).toString();
}
QString GemModel::GetDisplayName(const QModelIndex& modelIndex)
{
QString displayName = modelIndex.data(RoleDisplayName).toString();
if (displayName.isEmpty())
{
return GetName(modelIndex);
}
else
{
return displayName;
}
}
QString GemModel::GetCreator(const QModelIndex& modelIndex)
{
return modelIndex.data(RoleCreator).toString();
@@ -117,7 +132,7 @@ namespace O3DE::ProjectManager
QModelIndex modelIndex = FindIndexByNameString(dependingGemString);
if (modelIndex.isValid())
{
dependingGemString = GetName(modelIndex);
dependingGemString = GetDisplayName(modelIndex);
}
}
}