Make remove_invalid_o3de_projects take a path and return a value
Signed-off-by: pconroy <pconroy@amazon.com>
This commit is contained in:
@@ -483,9 +483,9 @@ namespace O3DE::ProjectManager
|
||||
return displayFirstTimeContent;
|
||||
}
|
||||
|
||||
void ProjectsScreen::RemoveInvalidProjects()
|
||||
bool ProjectsScreen::RemoveInvalidProjects()
|
||||
{
|
||||
PythonBindingsInterface::Get()->RemoveInvalidProjects();
|
||||
return PythonBindingsInterface::Get()->RemoveInvalidProjects();
|
||||
}
|
||||
|
||||
void ProjectsScreen::StartProjectBuild(const ProjectInfo& projectInfo)
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace O3DE::ProjectManager
|
||||
ProjectButton* CreateProjectButton(ProjectInfo& project, QLayout* flowLayout, bool processing = false);
|
||||
void ResetProjectsContent();
|
||||
bool ShouldDisplayFirstTimeContent();
|
||||
void RemoveInvalidProjects();
|
||||
bool RemoveInvalidProjects();
|
||||
|
||||
void StartProjectBuild(const ProjectInfo& projectInfo);
|
||||
QList<ProjectInfo>::iterator RequiresBuildProjectIterator(const QString& projectPath);
|
||||
|
||||
@@ -755,13 +755,19 @@ namespace O3DE::ProjectManager
|
||||
});
|
||||
}
|
||||
|
||||
void PythonBindings::RemoveInvalidProjects()
|
||||
bool PythonBindings::RemoveInvalidProjects()
|
||||
{
|
||||
ExecuteWithLockErrorHandling(
|
||||
bool removalResult = false;
|
||||
bool result = ExecuteWithLock(
|
||||
[&]
|
||||
{
|
||||
m_register.attr("remove_invalid_o3de_projects")();
|
||||
auto pythonRemovalResult = m_register.attr("remove_invalid_o3de_projects")();
|
||||
|
||||
// Returns an exit code so boolify it then invert result
|
||||
removalResult = !pythonRemovalResult.cast<bool>();
|
||||
});
|
||||
|
||||
return result && removalResult;
|
||||
}
|
||||
|
||||
AZ::Outcome<void, AZStd::string> PythonBindings::UpdateProject(const ProjectInfo& projectInfo)
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace O3DE::ProjectManager
|
||||
AZ::Outcome<void, AZStd::string> UpdateProject(const ProjectInfo& projectInfo) override;
|
||||
AZ::Outcome<void, AZStd::string> AddGemToProject(const QString& gemPath, const QString& projectPath) override;
|
||||
AZ::Outcome<void, AZStd::string> RemoveGemFromProject(const QString& gemPath, const QString& projectPath) override;
|
||||
void RemoveInvalidProjects() override;
|
||||
bool RemoveInvalidProjects() override;
|
||||
|
||||
// ProjectTemplate
|
||||
AZ::Outcome<QVector<ProjectTemplateInfo>> GetProjectTemplates(const QString& projectPath = {}) override;
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace O3DE::ProjectManager
|
||||
/**
|
||||
* Removes invalid projects from the manifest
|
||||
*/
|
||||
virtual void RemoveInvalidProjects() = 0;
|
||||
virtual bool RemoveInvalidProjects() = 0;
|
||||
|
||||
|
||||
// Project Templates
|
||||
|
||||
Reference in New Issue
Block a user