From c9ff634080f5364d64fda7c1e8ff799cdd37b6ea Mon Sep 17 00:00:00 2001 From: Benjamin Jillich <43751992+amzn-jillich@users.noreply.github.com> Date: Sun, 11 Jul 2021 23:30:07 -0700 Subject: [PATCH] Aftermath for PR-1956 and PR-2025 (#2035) Signed-off-by: Benjamin Jillich --- .../Source/GemCatalog/GemFilterTagWidget.cpp | 6 ++---- Code/Tools/ProjectManager/Source/ProjectUtils.cpp | 11 ++++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.cpp index c4612debc8..c7925a2d6e 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemFilterTagWidget.cpp @@ -10,7 +10,6 @@ #include #include #include -#include namespace O3DE::ProjectManager { @@ -72,10 +71,9 @@ namespace O3DE::ProjectManager hLayout->setMargin(0); hLayout->setSpacing(8); - const int numTags = tags.count(); - for (int i = 0; i < numTags; ++i) + for(const QString& tag : tags) { - FilterTagWidget* tagWidget = new FilterTagWidget(tags[i]); + FilterTagWidget* tagWidget = new FilterTagWidget(tag); // Add the tag widget to the current row. hLayout->addWidget(tagWidget); diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp index 82944aa41a..83e7546670 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp @@ -250,7 +250,7 @@ namespace O3DE::ProjectManager progressDialog->setValue(0); progressDialog->setRange(0, 1000); progressDialog->setModal(true); - progressDialog->setWindowTitle("Copying project ..."); + progressDialog->setWindowTitle(QObject::tr("Copying project ...")); progressDialog->show(); QLocale locale; @@ -259,7 +259,12 @@ namespace O3DE::ProjectManager // Create a human-readable version of the file size. const QString fileSizeString = locale.formattedDataSize(sizeInBytes); - progressDialog->setLabelText(QString("Indexing files ... %1 files found, %2 to copy.").arg(fileCount).arg(fileSizeString)); + progressDialog->setLabelText(QString("%1 ... %2 %3, %4 %5.") + .arg(QObject::tr("Indexing files")) + .arg(QString::number(fileCount)) + .arg(QObject::tr("files found")) + .arg(fileSizeString) + .arg(QObject::tr("to copy"))); qApp->processEvents(QEventLoop::ExcludeUserInputEvents); }); @@ -277,7 +282,7 @@ namespace O3DE::ProjectManager if (!success) { - progressDialog->setLabelText("Duplicating project failed/cancelled, removing already copied files ..."); + progressDialog->setLabelText(QObject::tr("Duplicating project failed/cancelled, removing already copied files ...")); qApp->processEvents(QEventLoop::ExcludeUserInputEvents); DeleteProjectFiles(newPath, true);