Added ability to list gem repos using CLI and integrated support into Project Manager
Signed-off-by: nggieber <nggieber@amazon.com>
This commit is contained in:
@@ -30,7 +30,7 @@ namespace O3DE::ProjectManager
|
||||
bool operator<(const GemRepoInfo& gemRepoInfo) const;
|
||||
|
||||
QString m_path = "";
|
||||
QString m_name = "Unknown Gem Repo Name";
|
||||
QString m_name = "Unknown Repo Name";
|
||||
QString m_creator = "Unknown Creator";
|
||||
bool m_isEnabled = false; //! Is the repo currently enabled for this engine?
|
||||
QString m_summary = "No summary provided.";
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <GemRepo/GemRepoItemDelegate.h>
|
||||
#include <GemRepo/GemRepoModel.h>
|
||||
#include <ProjectManagerDefs.h>
|
||||
|
||||
#include <QEvent>
|
||||
#include <QPainter>
|
||||
@@ -95,7 +96,7 @@ namespace O3DE::ProjectManager
|
||||
painter->drawText(repoCreatorRect, Qt::TextSingleLine, repoCreator);
|
||||
|
||||
// Repo update
|
||||
QString repoUpdatedDate = GemRepoModel::GetLastUpdated(modelIndex).toString("dd/MM/yyyy hh:mmap");
|
||||
QString repoUpdatedDate = GemRepoModel::GetLastUpdated(modelIndex).toString(RepoTimeFormat);
|
||||
repoUpdatedDate = standardFontMetrics.elidedText(repoUpdatedDate, Qt::TextElideMode::ElideRight, s_updatedMaxWidth);
|
||||
|
||||
QRect repoUpdatedDateRect = GetTextRect(standardFont, repoUpdatedDate, s_fontSize);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <GemRepo/GemRepoAddDialog.h>
|
||||
#include <GemRepo/GemRepoInspector.h>
|
||||
#include <PythonBindingsInterface.h>
|
||||
#include <ProjectManagerDefs.h>
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
@@ -104,9 +105,29 @@ namespace O3DE::ProjectManager
|
||||
{
|
||||
// Add all available repos to the model
|
||||
const QVector<GemRepoInfo> allGemRepoInfos = allGemRepoInfosResult.GetValue();
|
||||
QDateTime oldestRepoUpdate;
|
||||
if (!allGemRepoInfos.isEmpty())
|
||||
{
|
||||
oldestRepoUpdate = allGemRepoInfos[0].m_lastUpdated;
|
||||
}
|
||||
for (const GemRepoInfo& gemRepoInfo : allGemRepoInfos)
|
||||
{
|
||||
m_gemRepoModel->AddGemRepo(gemRepoInfo);
|
||||
|
||||
// Find least recently updated repo
|
||||
if (gemRepoInfo.m_lastUpdated < oldestRepoUpdate)
|
||||
{
|
||||
oldestRepoUpdate = gemRepoInfo.m_lastUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
if (!allGemRepoInfos.isEmpty())
|
||||
{
|
||||
m_lastAllUpdateLabel->setText(tr("Last Updated: %1").arg(oldestRepoUpdate.toString(RepoTimeFormat)));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_lastAllUpdateLabel->setText(tr("Last Updated: Never"));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user