Refactored ProjectManagerSettings, added tests, changed project built successful to be tracked by project path, added project ids, changed project settings path to use project id and name

Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>
This commit is contained in:
nggieber
2021-12-06 09:22:03 -08:00
parent 6150a60e57
commit 15237af23c
28 changed files with 622 additions and 132 deletions
@@ -9,14 +9,29 @@
#pragma once
#if !defined(Q_MOC_RUN)
#include <QString>
#include <QStringList>
#include <ProjectInfo.h>
#endif
namespace O3DE::ProjectManager
{
static constexpr char ProjectManagerKeyPrefix[] = "/O3DE/ProjectManager";
namespace PMSettings
{
static constexpr char ProjectManagerKeyPrefix[] = "/O3DE/ProjectManager";
void SaveProjectManagerSettings();
QString GetProjectBuiltSuccessfullyKey(const QString& projectName);
QString GetExternalLinkWarningKey();
}
bool SaveProjectManagerSettings();
bool GetProjectManagerKey(QString& result, const QString& settingsKey);
bool GetProjectManagerKey(bool& result, const QString& settingsKey);
bool SetProjectManagerKey(const QString& settingsKey, const QString& settingsValue, bool saveToDisk = true);
bool SetProjectManagerKey(const QString& settingsKey, bool settingsValue, bool saveToDisk = true);
bool RemoveProjectManagerKey(const QString& settingsKey, bool saveToDisk = true);
bool CopyProjectManagerKeyString(
const QString& settingsKeyOrig, const QString& settingsKeyDest, bool removeOrig = false, bool saveToDisk = true);
QString GetProjectKey(const ProjectInfo& projectInfo);
QString GetExternalLinkWarningKey();
bool GetProjectBuiltSuccessfully(bool& result, const ProjectInfo& projectInfo);
bool SetProjectBuiltSuccessfully(const ProjectInfo& projectInfo, bool successfullyBuilt, bool saveToDisk = true);
} // namespace PMSettings
} // namespace O3DE::ProjectManager