diff options
| author | Lioncash <mai.iam2048@gmail.com> | 2023-06-12 09:17:10 -0400 |
|---|---|---|
| committer | Lioncash <mai.iam2048@gmail.com> | 2023-06-12 09:26:16 -0400 |
| commit | 001fe6ff611d29f2b85d3a28a6e76e8b7fcec2ce (patch) | |
| tree | 1c9772dd198d5e048eeaf5389074f09c5a0a090c /Source/Core | |
| parent | 4e4705e98345fdf474a58a2e16bf78e1740cfbb3 (diff) | |
SkylanderPortalWindow: Detranslate unnecessary strings
This doesn't need to be handled by translators, since they're not
user-displayed text or just don't need to be translated.
While we're at it, we don't need to copy each entry of the resulting
list.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp b/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp index fd1c365521..90f4783fc4 100644 --- a/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp +++ b/Source/Core/DolphinQt/SkylanderPortal/SkylanderPortalWindow.cpp @@ -401,7 +401,8 @@ void SkylanderPortalWindow::LoadSelected() { if (m_skylander_list->currentItem() == nullptr) return; - file_path = m_collection_path + m_skylander_list->currentItem()->text() + tr(".sky"); + file_path = + m_collection_path + m_skylander_list->currentItem()->text() + QStringLiteral(".sky"); } else { @@ -436,7 +437,7 @@ void SkylanderPortalWindow::LoadSelected() } else { - m_last_skylander_path = QFileInfo(file_path).absolutePath() + tr("/"); + m_last_skylander_path = QFileInfo(file_path).absolutePath() + QLatin1Char{'/'}; LoadSkyfilePath(slot, file_path); } @@ -584,7 +585,7 @@ void SkylanderPortalWindow::RefreshList() { const QDir collection = QDir(m_collection_path); auto& system = Core::System::GetInstance(); - for (auto file : collection.entryInfoList(QStringList(tr("*.sky")))) + for (const auto& file : collection.entryInfoList(QStringList(QStringLiteral("*.sky")))) { File::IOFile sky_file(file.filePath().toStdString(), "r+b"); if (!sky_file) @@ -709,7 +710,7 @@ void SkylanderPortalWindow::UpdateSlotNames() } else { - display_string = QString(tr("Unknown (Id:%1 Var:%2)")).arg(sd->m_sky_id).arg(sd->m_sky_var); + display_string = tr("Unknown (Id:%1 Var:%2)").arg(sd->m_sky_id).arg(sd->m_sky_var); } } else @@ -818,7 +819,7 @@ QString SkylanderPortalWindow::GetFilePath(u16 id, u16 var) { const QDir collection = QDir(m_collection_path); auto& system = Core::System::GetInstance(); - for (auto file : collection.entryInfoList(QStringList(tr("*.sky")))) + for (const auto& file : collection.entryInfoList(QStringList(QStringLiteral("*.sky")))) { File::IOFile sky_file(file.filePath().toStdString(), "r+b"); if (!sky_file) |
