Asset Bundler - Minor Feedback (#550)

Asset Bundler - Minor Feedback

* updated the formatting so all lines are shorter than 140 characters

* fixed a few nitpicks that came up on a recent PR

* removed a function that wasn't being used anymore

* updated some error messages based on PR feedback
This commit is contained in:
Zaladane
2021-05-05 13:59:37 -07:00
committed by GitHub
parent 5783bf635b
commit 1455fcbde6
37 changed files with 529 additions and 207 deletions
@@ -20,13 +20,18 @@
namespace AssetBundler
{
const char* DateTimeFormat = "hh:mm:ss MMM dd, yyyy";
const char* ReadOnlyFileErrorMessage = "File (%s) is Read-Only. Please check your version control and try again.";
AssetBundlerAbstractFileTableModel::AssetBundlerAbstractFileTableModel(QObject* parent)
: QAbstractTableModel(parent)
{
}
void AssetBundlerAbstractFileTableModel::Reload(const char* fileExtension, const QSet<QString>& watchedFolders, const QSet<QString>& watchedFiles, const AZStd::unordered_map<AZStd::string, AZStd::string>& pathToProjectNameMap)
void AssetBundlerAbstractFileTableModel::Reload(
const char* fileExtension,
const QSet<QString>& watchedFolders,
const QSet<QString>& watchedFiles,
const AZStd::unordered_map<AZStd::string, AZStd::string>& pathToProjectNameMap)
{
AZStd::vector<AZStd::string> keysToRemove = m_fileListKeys;
@@ -49,7 +54,9 @@ namespace AssetBundler
// If a project name is already specified, then the associated file is a default file
LoadFile(absolutePath, projectName, !projectName.empty());
keysToRemove.erase(AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)), keysToRemove.end());
keysToRemove.erase(
AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)),
keysToRemove.end());
}
}
@@ -63,7 +70,9 @@ namespace AssetBundler
// If a project name is already specified, then the associated file is a default file
LoadFile(absolutePath, projectName, !projectName.empty());
keysToRemove.erase(AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)), keysToRemove.end());
keysToRemove.erase(
AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)),
keysToRemove.end());
}
}
@@ -74,7 +83,9 @@ namespace AssetBundler
}
}
void AssetBundlerAbstractFileTableModel::ReloadFiles(const AZStd::vector<AZStd::string>& absoluteFilePathList, AZStd::unordered_map<AZStd::string, AZStd::string> pathToProjectNameMap)
void AssetBundlerAbstractFileTableModel::ReloadFiles(
const AZStd::vector<AZStd::string>& absoluteFilePathList,
AZStd::unordered_map<AZStd::string, AZStd::string> pathToProjectNameMap)
{
for (const AZStd::string& absoluteFilePath : absoluteFilePathList)
{